home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / graphics / aplus400.zip / ANSIPLUS.DOC < prev    next >
Text File  |  1994-08-28  |  158KB  |  3,305 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.                   ANSIPLUS Enhanced Console Device Driver
  25.  
  26.                         User's Guide, Release 4.00
  27.  
  28.                           Shareware Documentation
  29.  
  30.                               August 28, 1994
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.                COPYRIGHT (C) 1992-1994 by Kristofer Sweger
  61.                      P.O. Box 378, Larkspur, CA 94977
  62.                            All Rights Reserved
  63.  
  64. The ANSIPLUS console device driver, supporting utility programs, and this
  65. User's Guide are Copyrighted (C) 1992-1994 by Kristofer Sweger.  This software
  66. and accompanying documentation are protected by United States Copyright law and
  67. also by International Treaty provisions.  The ANSIPLUS computer program and
  68. this documentation may not be reproduced, copied, disclosed, or transferred in
  69. any form (machine-readable or photo-copy included), except as provided here
  70. under "Limited License" (see page 3), without the express prior written
  71. approval of the author.
  72.  
  73. U.S. Government Information: Use, duplication, or disclosure by the U.S.
  74. Government of the computer software and documentation in this package shall be
  75. subject to the restricted rights applicable to commercial computer software as
  76. set forth in subdivision (b)(3)(ii) of the Rights in Technical Data and
  77. Computer Software clause at 252.227-7013 (DFARS 52.227-7013).  The Contractor/
  78. manufacturer is: Kristofer Sweger, P.O.  Box 378, Larkspur, CA 94977.
  79.  
  80.                           DISCLAIMER OF WARRANTY
  81.  
  82. Kristofer Sweger makes no warranty of any kind, express or implied, including,
  83. without limitation, any warranties of performance, merchantability and/or
  84. fitness for a particular purpose.  This software and accompanying documentation
  85. are provided "as is," without warranty of any kind.  The entire risk as to
  86. results and performance is assumed by you.
  87.  
  88. Kristofer Sweger shall not be liable for any damages, whether direct, indirect,
  89. consequential or incidental arising from a failure of the ANSIPLUS programs to
  90. operate in the manner desired by the user.  Nor shall Kristofer Sweger be
  91. liable for any data, property or other damages which may be caused directly or
  92. indirectly by use, alteration of or inability to use the software, even if
  93. Kristofer Sweger has been advised of the possibility of such damages.  In no
  94. event shall the liability for any damages exceed the price paid for the license
  95. to use the software, regardless of the form and/or extent of the claim.  By
  96. using the software you agree to this.
  97.  
  98. The author further reserves the right to revise or alter the contents of this
  99. documentation or the ANSIPLUS software package from time to time without
  100. notifying any person or group of such changes or alterations.
  101.  
  102. The Limited License and Disclaimer of Warranty shall be construed, interpreted
  103. and governed by the laws of the State of California.
  104.  
  105.                                 TRADEMARKS
  106.  
  107. ANSIPLUS is a trademark of Kristofer Sweger.  Microsoft and MS-DOS are
  108. registered trademarks of Microsoft Corporation.  IBM, OS/2 and PS/2 are
  109. registered trademarks of IBM Corporation.  Windows is a trademark of Microsoft
  110. Corporation.  4DOS is a registered trademark of JP Software, Inc.  Norton
  111. Utilities is a registered trademark of Symantec Corporation.  QEMM and DESQview
  112. are registered trademarks of Quarterdeck Office Systems, Inc.  386MAX is a
  113. trademark of Qualitas, Inc.  Other product names are the trademarks of their
  114. respective manufacturers.  Other trademarked names may appear in this manual.
  115. The author states that he is using the trademarked names only for editorial
  116. purposes, and to the benefit of the trademark owner, with no intention of
  117. infringing upon any trademark.
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.                              Table of Contents
  125.  
  126.  
  127.  
  128.   I. Introduction
  129.  
  130.           Product description . . . . . . . . . . . . . . . . . . . . .  1
  131.           Registration  . . . . . . . . . . . . . . . . . . . . . . . .  2
  132.           Limited License . . . . . . . . . . . . . . . . . . . . . . .  3
  133.           Technical Support . . . . . . . . . . . . . . . . . . . . . .  4
  134.  
  135.  II. Features summary
  136.  
  137.           VGA/EGA display features  . . . . . . . . . . . . . . . . . .  5
  138.           Integrated console functions  . . . . . . . . . . . . . . . .  6
  139.           Other ANSIPLUS features . . . . . . . . . . . . . . . . . . .  8
  140.  
  141. III. Installing ANSIPLUS
  142.  
  143.           Installing the device driver and utility programs . . . . . . 11
  144.           Changing the ANSIPLUS startup configuration . . . . . . . . . 15
  145.  
  146.  IV. Using ANSIPLUS
  147.  
  148.           Special keyboard and mouse functions  . . . . . . . . . . . . 25
  149.           Selecting and defining colors . . . . . . . . . . . . . . . . 29
  150.           Controlling other ANSIPLUS features . . . . . . . . . . . . . 33
  151.           Creating application batch files  . . . . . . . . . . . . . . 37
  152.           Editing ANSI escape sequence programs . . . . . . . . . . . . 40
  153.  
  154.   V. ANSIPLUS escape sequences
  155.  
  156.           Overview  . . . . . . . . . . . . . . . . . . . . . . . . . . 41
  157.  
  158.  VI. Technical notes
  159.  
  160.           ANSIPLUS and Windows 3  . . . . . . . . . . . . . . . . . . . 43
  161.           ANSIPLUS and the 4DOS or NDOS command shells  . . . . . . . . 46
  162.           ANSIPLUS and Multitaskers or Task Switchers . . . . . . . . . 47
  163.           ANSIPLUS extensions and the ANSI standard . . . . . . . . . . 49
  164.           Escape sequence recognizer enhancements . . . . . . . . . . . 50
  165.           Direct access to video RAM vs. BIOS calls . . . . . . . . . . 50
  166.           Installation check and Interrupt 2Fh API  . . . . . . . . . . 51
  167.           Hooked interrupts . . . . . . . . . . . . . . . . . . . . . . 52
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178. I.   INTRODUCTION
  179.  
  180. The DOS console device driver provides the critical interface between you and
  181. your personal computer.  It controls the output you see from DOS and accepts
  182. your keyboard input, and you spend a whole lot of time using it.
  183. Unfortunately, the standard console and ANSI device drivers supplied with DOS
  184. do not take full advantage of the capabilities of the major video controllers
  185. currently in use: VGA and SuperVGA (SVGA).  In addition, the standard personal
  186. computer BIOS (the "Basic Input Output System" that is part of the computer's
  187. hardware) has limitations that have had to be addressed individually by several
  188. TSR (Terminate and Stay Resident) programs or device drivers, by work-arounds
  189. and special drivers in major application programs, or by using graphical user
  190. interfaces such as Windows.
  191.  
  192. The ANSIPLUS console device driver integrates major console elements missing
  193. from DOS and the personal computer BIOS into a single compact device driver
  194. that can easily be controlled and personalized.  With ANSIPLUS installed:
  195.  
  196.  * User interaction with the DOS command processor and many applications will
  197.    be significantly improved.
  198.  
  199.  * Screen output will be faster than with DOS's ANSI and non-ANSI drivers.
  200.  
  201.  * The user will have complete control over colors and VGA/EGA capabilities.
  202.  
  203.  * Users of MS-DOS, Windows, OS/2, DESQview or Novell DOS will have access to
  204.    ANSIPLUS features in all windowed and full screen DOS sessions.
  205.  
  206.  * The user will also benefit from all the other display and keyboard features
  207.    provided by ANSIPLUS.
  208.  
  209. This is a fully functional Shareware copy of the ANSIPLUS product.  As such, it
  210. is made available to the general computing public for evaluation.  Users are
  211. licensed to operate ANSIPLUS on their personal computers for the purpose of
  212. test and evaluation for a limited trial period of thirty days.  After
  213. evaluation, if the user decides the ANSIPLUS programs are not of sufficient
  214. merit to warrant purchase through registration with Kristofer Sweger, all
  215. ANSIPLUS programs should be removed from their personal computer.  If ANSIPLUS
  216. is found to be useful and is in regular use, then registration is required.
  217.  
  218. This manual is organized in six chapters:
  219.  
  220.  * Chapter 1 introduces ANSIPLUS and covers product licensing and support;
  221.  
  222.  * Chapter 2 summarizes ANSIPLUS features for those who want to know what it
  223.    can do;
  224.  
  225.  * Chapter 3 discusses installing and configuring ANSIPLUS on your computer;
  226.  
  227.  * Chapter 4 describes keyboard functions and utility programs accessible to
  228.    users after installation;
  229.  
  230.  * Chapter 5 lists ANSIPLUS escape sequences; and
  231.  
  232.  * Chapter 6 contains several technical notes of interest to programmers and
  233.    others.
  234.  
  235.                                        1
  236.  
  237.                                 REGISTRATION
  238.  
  239. By paying the registration fee for ANSIPLUS, registered users are granted a
  240. license to use the software on any single computer system.  Registered users
  241. also receive:
  242.  
  243.  * The TSR-capable registered version of the ANSIPLUS driver, ANSIPLUS.exe.
  244.    This driver may be loaded into memory from the DOS command line, from a
  245.    batch file (AUTOEXEC.bat), or from CONFIG.sys with DEVICE=, DEVICEHIGH=, or
  246.    INSTALL= commands.  The Registered ANSIPLUS driver also doesn't have that
  247.    pesky time delay in the sign-on message.  The registered version is NOT
  248.    Shareware, so it may not be copied for others.
  249.  
  250.  * A printed copy of the ANSIPLUS manual, which contains detailed documentation
  251.    on using the ANSIPLUS Escape sequences and the ANSIPLUS Int 2Fh API.  This
  252.    information is provided only in the printed manual, and is not included in
  253.    either the Shareware version or on the Registered diskettes.  (Diskette-only
  254.    registration does not include the printed manual.)
  255.  
  256.  * The most recent versions of the ANSIPLUS utility programs and other files in
  257.    the ANSIPLUS package.
  258.  
  259.  * Free BBS updates.  Registered ANSIPLUS users can obtain free updates by
  260.    installing future Shareware versions of ANSIPLUS over their registered
  261.    copies.  The ANSIPLUS installation program will automatically register a
  262.    Shareware copy when it is installed on a disk that loads a registered copy
  263.    of ANSIPLUS with its CONFIG.sys.
  264.  
  265. Registration helps support further improvements to ANSIPLUS.  The easiest way
  266. to register ANSIPLUS is to print out the registration form file, REGISTER.pls,
  267. fill it out, and mail with payment to:
  268.  
  269.           Kristofer Sweger
  270.           P.O. Box 378
  271.           Larkspur, CA 94977
  272.  
  273. Be sure to specify whether you want a 3.5" or 5.25" diskette, and to include
  274. the mailing address for your registered ANSIPLUS and manual.
  275.  
  276. Payment may be by check drawn on a United States or Canadian bank, money order,
  277. Eurocheque in U.S. dollars, or credit card (Visa or Master Card only).  Credit
  278. card orders are also accepted by telephone on the ANSIPLUS support line,
  279. 415/924-5407, and signed credit card orders may be sent by fax to 415/924-0258.
  280. We are pleased to accept purchase orders from established U.S. companies and
  281. government agencies.  However, orders under $100 must be prepaid.  For orders
  282. of $100 or more, our terms are net 30 days.  Credit references may be required.
  283.  
  284. Pricing is shown in REGISTER.pls.  California residents or businesses operating
  285. in California must add California sales tax.  Other additional charges for
  286. shipping to destinations outside the United States and Canada, delivery of a
  287. Zip file via CompuServe, or processing a EuroCheque may apply.
  288.  
  289. Multi-computer licenses for use of ANSIPLUS are available upon request at a
  290. substantially reduced fee per machine.  Call the ANSIPLUS support line for a
  291. price quotation.
  292.  
  293.                                        2
  294.  
  295.  
  296.                               LIMITED LICENSE
  297.  
  298. Non-registered users of ANSIPLUS are licensed ONLY to evaluate the programs and
  299. device driver for up to thirty days for the sole purpose of determining whether
  300. or not it meets their requirements.  All other use requires registration.  Any
  301. other use of non-registered copies of ANSIPLUS by any person, business,
  302. corporation, or government organization, is not permitted.
  303.  
  304. Registered copies of ANSIPLUS may NOT be copied for others.  However, per-
  305. mission is hereby granted for individuals to copy the non-registered ANSIPLUS
  306. package for their own use (for evaluation and backup purposes) or for other
  307. individuals to evaluate, provided all of the following conditions are met:
  308.  
  309.  * The ANSIPLUS package, including all related program and documentation files,
  310.    cannot be modified in any way and must be distributed in its entirety, with
  311.    no additions.  These files constitute the ANSIPLUS Shareware package:
  312.  
  313.      ANSIPLUS.sys        ANSIPLUS Shareware console device driver
  314.      ANSIPLSR.sys        ANSIPLUS Shareware reduced size device driver
  315.      ANSIPLUS.doc        ANSIPLUS Shareware documentation
  316.      SETCOLOR.exe        Color control utility program
  317.      SETAPLUS.exe        Driver features control utility program
  318.      ANSICOM.exe         ANSI escape sequence editor
  319.      NEWAPLUS.exe        ANSIPLUS bootup configuration program
  320.      APLUSLIB.exe        Execution library for the utility programs
  321.      SETCOLOR.sch        Color schemes file for SETCOLOR.exe
  322.      CONSETUP.com        Sample escape sequence program
  323.      PUSHVID.com         Save the current video mode, video page and colors
  324.      POPVID.com          Restore saved video mode, page and colors
  325.      PUSHKEYS.com        Save the current key reassignments
  326.      POPKEYS.com         Restore saved key reassignments
  327.      LOCKPAL.com         Lock the 16-color palette
  328.      UNLOKPAL.com        Unlock the 16-color palette
  329.      WINVGA16.com        MS Windows 16-color VGA driver palette change
  330.      VWFD.386            Windowed vs. full screen test Windows VxD
  331.      APLUS.pif           Sample Windows PIF file
  332.      CPCH.bat            Change code page
  333.      INSTALL.exe         Installation program
  334.      INSTALL.inf         Installation control file
  335.      INSTALL.cve         Installation data file
  336.      REGISTER.pls        ANSIPLUS registration form
  337.      README.pls          Release notes
  338.  
  339.  * No price or other compensation may be charged for the ANSIPLUS package.  A
  340.    distribution cost may be charged for the cost of the diskette or CD-ROM,
  341.    shipping and handling, as long as the total per diskette does not exceed US
  342.    $6.00 in the United States and Canada or US $10.00 internationally, and the
  343.    total per CD-ROM disk does not exceed US $50.00.
  344.  
  345.  * The ANSIPLUS package cannot be bundled or included with other goods or
  346.    services, nor can it be included in any commercial software packaging offer,
  347.    nor can it be "rented" or "leased" to others, without specific prior written
  348.    agreement from Kristofer Sweger.
  349.  
  350.  
  351.  
  352.  
  353.                                        3
  354.  
  355. Because ANSIPLUS is distributed as Shareware, the driver contains internal
  356. checks to increase its resistance to tampering.  Users are therefore NOT
  357. licensed to alter or "patch" the driver, and the driver will terminate
  358. installation or will not work properly if it detects attempts to change it.
  359.  
  360. All rights not expressly granted here are reserved to Kristofer Sweger.
  361.  
  362.  
  363.                              TECHNICAL SUPPORT
  364.  
  365. We want our users to be satisfied, and we find the interaction with real users
  366. of ANSIPLUS to be of great value.  Many ANSIPLUS features are the result of
  367. user input.  If you have a problem evaluating ANSIPLUS or want to make a
  368. suggestion, comment, or complaint, please contact us immediately, whether you
  369. have registered or not.  There are several ways you can reach ANSIPLUS support:
  370.  
  371.  * Electronic mail via CompuServe at 72713,1241
  372.  
  373.  * Electronic mail via Internet at 72713.1241@compuserve.com
  374.  
  375.  * Fax at 415/924-0258
  376.  
  377.  * Voice telephone at 415/924-5407
  378.  
  379.  * U.S. mail at P.O. Box 378, Larkspur, CA 94977 USA
  380.  
  381. The ANSIPLUS technical support telephone line, 415/924-5407, can be called
  382. weekdays from 10:00 AM to 5:00 PM, Pacific Time.  We ask that you recognize
  383. that this service can easily be overwhelmed by calls with questions that are
  384. already answered in the documentation provided.  When you do call, please try
  385. to have all your questions (and any necessary supporting data) ready so that we
  386. can deal with them efficiently in one short session.
  387.  
  388. If you are reporting a software problem, we will need specific information
  389. about your computer system and how to recreate the problem:
  390.  
  391.  * What is the problem, or what is not behaving as expected?
  392.  
  393.  * What exactly must be done to cause the problem to appear?
  394.  
  395.  * What did you do to try to fix or work around the problem?
  396.  
  397.  * What is your software and hardware environment?  This includes the version
  398.    of ANSIPLUS you are using, your computer type, DOS version, video
  399.    controller, any memory managers, other device drivers or TSRs loaded, and
  400.    any other software or hardware in use at the time.
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.                                        4
  413.  
  414. II.  FEATURES SUMMARY
  415.  
  416. Although many of the ANSIPLUS features described here may seem technical, each
  417. meets a need, and they all cooperate as parts of one compact console device
  418. driver.  In this chapter, they have been collected into three major groups:
  419. VGA/EGA display features, integrated console functions, and other ANSIPLUS
  420. features.  The remaining chapters give details regarding specific features.
  421.  
  422.                          VGA/EGA DISPLAY FEATURES
  423.  
  424. The ANSIPLUS enhanced DOS console device driver is tailored to take advantage
  425. of SVGA, VGA and EGA display capabilities:
  426.  
  427. Mode recognition    For any SVGA/VGA/EGA display mode, the driver can properly
  428.                     address the entire screen.  ANSIPLUS automatically
  429.                     recognizes and adapts to various VGA or EGA screen modes,
  430.                     both text and graphics, including extended modes with large
  431.                     numbers of lines and/or columns.  ANSIPLUS can also
  432.                     automatically adapt to and compensate for older video
  433.                     controllers with very limited numbers of colors or shades
  434.                     (i.e., CGA or monochrome boards).
  435.  
  436. Speed               In text and in 16-color VGA/EGA graphics display modes, the
  437.                     driver bypasses the ROM BIOS and goes straight to the video
  438.                     RAM, so it can operate much faster than either the original
  439.                     DOS console driver or the DOS ANSI driver. Programs that
  440.                     write large character strings to the standard output
  441.                     (console) file handle in "raw" mode can generate their
  442.                     output many times faster.
  443.  
  444. Color selection     ANSIPLUS provides full control over colors. In color text
  445.                     modes, sixteen foreground and background colors are
  446.                     supported.  In 16-color VGA/EGA graphics modes, ANSIPLUS
  447.                     allows mixing of background colors, for a total of 136
  448.                     possible background colors.  In 256-color VGA graphics
  449.                     modes, all 256 foreground and background colors are
  450.                     supported.
  451.  
  452. Palette control     Control over VGA/EGA palette registers and VGA DAC
  453.                     registers allows selecting and maintaining colors using the
  454.                     video controller's full capabilities.  The driver traps all
  455.                     video mode changes, and installs the palette and/or DAC
  456.                     colors of the user's, or of ANSIPLUS's color scheme.
  457.                     Applications that set their own palettes will continue to
  458.                     do so, but those that do not can now use custom color
  459.                     choices.  Blinking can also be kept disabled to allow 16
  460.                     background colors in text modes.
  461.  
  462. Text size           ANSIPLUS allows selection of alternate VGA/EGA character
  463.                     sets, giving control over the character height, and thus
  464.                     the number of text lines used in any VGA/EGA video mode.
  465.  
  466. Smooth scrolling    ANSIPLUS supports smooth scrolling of the screen (for fast
  467.                     CPUs with 16-bit VGA/EGA), so the screen can be read while
  468.                     it is moving. Options are provided to control the use and
  469.                     rate of smooth scrolling.
  470.  
  471.                                        5
  472.  
  473.  
  474. Extended modes      The ANSI Set Mode control sequence has been expanded to
  475.                     allow specifying SVGA/VGA/EGA modes that are based on full
  476.                     AX and/or BX CPU register values, extending ANSI-type
  477.                     control to Super VGA/EGA controllers that require such
  478.                     register settings.  Super VGA controllers that conform to
  479.                     the VESA standard are also automatically recognized, and
  480.                     VESA extended set mode calls are made by the ANSIPLUS
  481.                     driver for modes of 100h or higher.
  482.  
  483.  
  484.                        INTEGRATED CONSOLE FUNCTIONS
  485.  
  486. The ANSIPLUS driver efficiently integrates several useful console functions
  487. that in the past had to be provided by separate TSR programs or device drivers:
  488.  
  489. Screen saver        A screen saver blanks the VGA/EGA screen after several
  490.                     minutes of screen, keyboard and mouse inactivity.  The
  491.                     screen can be brought back by any keystroke (including
  492.                     shift keys) or by mouse movement or buttons.  The screen
  493.                     saver feature can be enabled or disabled by the user, and
  494.                     is automatically disabled in certain situations.
  495.  
  496. Scroll-back         Every DOS user sooner or later needs to recall something
  497.                     that was on the screen, but has scrolled off the top.
  498.                     Programmers often encounter this with error messages, and
  499.                     other users with file directory listings.  To address this
  500.                     problem, ANSIPLUS supports screen scroll-back: all lines
  501.                     scrolled and cleared from the screen in text modes are
  502.                     captured by the ANSIPLUS driver so that the user can stop
  503.                     at any time and browse through recent screen contents.
  504.  
  505. Scroll lock         Large directory listings and other rapidly generated screen
  506.                     output can often fly by on the screen too fast to be read.
  507.                     Hitting the Scroll Lock key will freeze the screen when
  508.                     ANSIPLUS or the BIOS next tries to scroll it.  When the
  509.                     screen is frozen, several keystroke options allow control
  510.                     over subsequent screen output.
  511.  
  512. Copy and paste      It is often desirable to bring back data or commands that
  513.                     have scrolled off the screen or to transfer information
  514.                     between programs, but without having to retype the data.
  515.                     And under Windows, it is often desirable to copy text
  516.                     between a full screen application and the Windows clipboard
  517.                     without having to switch into a window.  ANSIPLUS addresses
  518.                     both these needs by letting you use the mouse or keyboard
  519.                     to select text, copy it to the clipboard, and paste it to
  520.                     the keyboard.  See "Special Keyboard and Mouse Functions"
  521.                     in Chapter 4 for more information about this feature.
  522.  
  523. Keyboard buffer     As many PC users eventually discover, the standard personal
  524.                     computer BIOS provides a keyboard input type-ahead buffer
  525.                     of only 15 characters, which is enough for only the
  526.                     shortest of commands.  ANSIPLUS extends this by 113
  527.                     keystrokes for a total type-ahead of 128 keystrokes
  528.                     (configurable for more if necessary).
  529.  
  530.                                        6
  531.  
  532.  
  533. Repeated keys       Another problem with the standard BIOS keystroke buffer
  534.                     occurs when keys are held down too long, and the buffer
  535.                     rapidly fills with repeated (or "typematic") keys, which
  536.                     are then processed long after the key is lifted.
  537.                     Spreadsheet users often experience this when holding down
  538.                     one of the arrow keys.  ANSIPLUS disables repeat key
  539.                     type-ahead, but does allow repeat keys that are immediately
  540.                     consumed by programs, so the type-ahead buffer cannot be
  541.                     filled with unintended keystrokes.  Repeated digits are
  542.                     also suppressed, making it impossible to inaccurately enter
  543.                     a number just because a key is held down too long.  The
  544.                     rate at which repeated keys are generated is also
  545.                     configurable.
  546.  
  547. Key stacking        ANSIPLUS supports key stacking, which can load the keyboard
  548.                     buffer with a series of keystrokes and feed them into
  549.                     programs or commands as if they had been typed at the
  550.                     keyboard.  This feature can be useful for automating
  551.                     startup of programs, software testing, and demonstrations.
  552.                     Keys can be added to the buffer by ANSI escape sequence, by
  553.                     ANSIPLUS utility program command, or, for users of the 4DOS
  554.                     4.0+ or NDOS Version 7.0+ command shells, by KEYSTACK
  555.                     command.
  556.  
  557. Beep tone           The standard personal computer BIOS Ctrl+G beep tone
  558.                     generator waits in a programmed loop until sound output is
  559.                     completed.  Sometimes, error or other conditions detected
  560.                     in a running program can generate a rapid sequence of
  561.                     beeps, and the computer will just hang for what seems an
  562.                     eternity, beeping away.  ANSIPLUS has a timer interrupt-
  563.                     controlled tone generator that lets the beep tone be
  564.                     finished in parallel with subsequent processing.  Multiple
  565.                     beeps are ignored if a tone is currently being generated,
  566.                     so programs cannot be slowed down by a rapid series of
  567.                     beeps.  Options are provided for defining the tone and
  568.                     using or not using the tone generator.
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.                                        7
  590.  
  591.                           OTHER ANSIPLUS FEATURES
  592.  
  593. Other ANSIPLUS features include:
  594.  
  595. User control        Menu driven, mouse controllable utilities give the user
  596.                     full control over selected colors, color palettes, border
  597.                     colors, video modes, text height, key reassignment, beep
  598.                     tone definition, driver table sizes, and all other
  599.                     configurable features.
  600.  
  601. Loading options     At load time, the ANSIPLUS driver can divide itself into
  602.                     sharable code (18K to 28K) and unshared code/data (about
  603.                     6K) sections, placing the shared code in XMS upper memory
  604.                     blocks (from 640K to 1M), in high memory (1M to 1M+64K), or
  605.                     in expanded memory (EMS), and leaving only the unshared
  606.                     part in either low or upper memory.  The registered driver
  607.                     can be loaded as either a TSR program or a device driver.
  608.  
  609. Reduced driver      For systems with very limited available memory, a reduced
  610.                     capability driver that is 35 percent smaller may be used
  611.                     instead of the full capability ANSIPLUS driver.
  612.  
  613. Windows aware       ANSIPLUS features have been tested and adjusted for maximum
  614.                     compatibility in Windows DOS sessions, both full screen and
  615.                     within a window. The ANSIPLUS driver detects when Windows
  616.                     is running, and automatically disables or alters certain
  617.                     features, such as the screen blanker, that may interfere.
  618.  
  619. OS/2 compatible     ANSIPLUS can be used in OS/2 2.x DOS sessions, loaded
  620.                     either as a standard DOS device driver by CONFIG.sys or
  621.                     as a DOS TSR.  The driver automatically makes minor
  622.                     adjustments under OS/2, such as suppressing the ANSIPLUS
  623.                     signon message because virtual DOS machines are created and
  624.                     initialized so often by OS/2.
  625.  
  626. Multitaskers and    ANSIPLUS detects and adjusts for DESQview. Under DESQview,
  627. task switchers      the driver is loaded separately for each window that needs
  628.                     it. Under task switchers like MS-DOS DOSSHELL, each task
  629.                     automatically has an independent ANSIPLUS as its console.
  630.  
  631. ANSI support        All MS-DOS ANSI.sys escape sequences are supported, plus
  632.                     about two dozen other ANSI and VT-100 escape sequences for
  633.                     clearing the screen, erasing, inserting and deleting lines
  634.                     and characters, scrolling, page selection, tab control, and
  635.                     cursor positioning.  ANSIPLUS also enhances many escape
  636.                     sequences by accepting extra parameters that increase their
  637.                     power.
  638.  
  639. Bright key echo     ANSIPLUS highlights user-typed keys when they are displayed
  640.                     by DOS on the screen, giving a clear visual separation of
  641.                     typed entries from computer output.  If unwanted, this
  642.                     feature can be disabled.
  643.  
  644.  
  645.  
  646.  
  647.  
  648.                                        8
  649.  
  650. Key processing      ANSIPLUS includes several special key processing options:
  651.  
  652.                     (1) the Shift+alphabetic keys can cause Caps-Lock to
  653.                         unlock, much like a typewriter releases its shift lock
  654.                         whenever a shift key is pressed;
  655.  
  656.                     (2) the Enter key can restore Caps-Lock after it was
  657.                         unlocked by a Shift+alphabetic key, thus restoring Caps
  658.                         on completion of an "entry";
  659.  
  660.                     (3) Ctrl+C can cause a Ctrl+Break, for those users who
  661.                         prefer the Ctrl+C key; and
  662.  
  663.                     (4) the DOS "Non-Destructive" read function can return the
  664.                         last key in the keyboard buffer instead of the first,
  665.                         so that it always reflects what has last been typed.
  666.  
  667. Key reassignment    ANSIPLUS has the ability to translate single keystrokes to
  668.                     full commands or other pre-determined key sequences.  These
  669.                     key reassignments can be applied either to keys entered
  670.                     through DOS or to all keys entered via BIOS Interrupt 16h.
  671.                     Both expansion of keys and changes to key reassignments can
  672.                     also be enabled or disabled independently.  When key
  673.                     reassignment changes are disabled, a distinctive tone
  674.                     sounds on any attempt to redefine a key, making it easy to
  675.                     detect ANSI-type files that contain key redefinitions.  Key
  676.                     reassignments can also be saved and restored, allowing
  677.                     simple restoration of a standard key set after using
  678.                     special reassignments in an application.
  679.  
  680. Scrolling regions   The driver has the ability to restrict DOS, ANSI and video
  681.                     BIOS output to any user-defined sub-screen region or
  682.                     "window." This can simplify writing or adapting certain
  683.                     applications, because screen output can be directed to any
  684.                     desired area of the screen while a subroutine or program
  685.                     "thinks" it is using a normal screen.
  686.  
  687. Mono/CGA support    ANSIPLUS should give reasonable and readable displays in
  688.                     all display modes, including those with a very limited
  689.                     number of colors or shades.  ANSI-type programs written in
  690.                     terms of 16 colors will be executable on machines with
  691.                     simpler video capabilities, if ANSIPLUS is running on that
  692.                     machine.
  693.  
  694. Line wrapping       When the length of a line displayed on the screen exactly
  695.                     equals the width of the screen, the standard DOS console
  696.                     device drivers cause a blank line to be output.  ANSIPLUS
  697.                     suppresses output of these unintended blank lines.
  698.  
  699. Graphics cursor     The DOS console drivers do not show a cursor on the screen
  700.                     when in graphics modes.  ANSIPLUS can display a cursor when
  701.                     keyed entries are requested by DOS in a graphics mode.
  702.  
  703. BIOS TTY ANSI       ANSIPLUS provides an option to trap and execute ANSI
  704.                     control sequences in BIOS Int 10h Write TTY output as well
  705.                     as in DOS standard console output.
  706.  
  707.                                        9
  708.  
  709. Transparent mode    On occasion, it is undesirable to have the ANSI driver fill
  710.                     in the background color of each character space as it
  711.                     writes characters.  ANSIPLUS includes a "transparent"
  712.                     background mode that will write each output character in
  713.                     the current foreground color over whatever background is
  714.                     currently at the cursor position.
  715.  
  716. Text treatments     In 16-color graphics modes, ANSIPLUS can apply bold,
  717.                     underline, black shadow, slant (italics), or black outline
  718.                     text treatments, in any combination, to output characters
  719.                     for emphasis or improved legibility.
  720.  
  721. Esc pass-through    Unlike the ANSI.sys driver, the Esc character is trapped by
  722.                     ANSIPLUS only when followed by a left bracket ("["), so
  723.                     programs that write Esc (a left arrow) to the screen will
  724.                     continue to do so after ANSIPLUS is installed.
  725.  
  726. VGA mono emulation  Because application developers with VGA color monitors
  727.                     sometimes need to see how their systems will look when run
  728.                     with a monochrome VGA monitor, ANSIPLUS provides an option
  729.                     to emulate a monochrome VGA monitor on a color monitor.
  730.  
  731. Status reporting    To allow programs to query ANSIPLUS about more than just the
  732.                     current cursor location, the device status report has been
  733.                     extended to report information about the current video
  734.                     mode, video page, numbers of rows, columns and colors,
  735.                     current or default definition of colors, and more.
  736.  
  737. Installation check  To facilitate developing applications that can use ANSIPLUS
  738. and Int 2Fh API     features, ANSIPLUS responds to standard Int 2Fh ANSI.sys
  739.                     installation checks, and includes extensions that can
  740.                     distinguish ANSIPLUS from ANSI.sys.  The ANSIPLUS Int 2Fh
  741.                     API provides special functions for programmers.
  742.  
  743. Free BBS Updates    When a Shareware copy of ANSIPLUS is installed on a disk
  744.                     that boots a Registered copy, the INSTALL program will
  745.                     convert the new Shareware ANSIPLUS.sys driver into a
  746.                     Registered ANSIPLUS.exe driver with the same serial number
  747.                     and signon message as the Registered ANSIPLUS.exe already
  748.                     on the disk.  Registered users can thus benefit from future
  749.                     improvements to ANSIPLUS at no cost, if they have access to
  750.                     CompuServe or a bulletin board system (BBS) that maintains
  751.                     recent Shareware versions of ANSIPLUS.
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.                                        10
  767.  
  768. III. INSTALLING ANSIPLUS
  769.  
  770.  
  771.         INSTALLING THE ANSIPLUS DEVICE DRIVER AND UTILITY PROGRAMS
  772.  
  773. The ANSIPLUS package includes an installation and configuration program called
  774. INSTALL.exe, which should properly handle most installations.  INSTALL analyzes
  775. the runtime environment, CONFIG.sys and AUTOEXEC.bat of the target drive,
  776. locates the source files, copies ANSIPLUS to the target drive (or to any
  777. sub-directories of the user's choice), and updates CONFIG.sys and AUTOEXEC.bat.
  778.  
  779. Starting with MS-DOS 6.0, the CONFIG.sys file can contain menus and multiple
  780. configuration blocks.  When a CONFIG.sys menu is being used, a new ANSIPLUS
  781. installation will require selecting a configuration block to receive the
  782. ANSIPLUS DEVICE= command, and an update will require selecting a block that
  783. either already refers to ANSIPLUS, or to which it will be added.  INSTALL makes
  784. an initial choice of configuration block, and the user can correct this before
  785. copying the ANSIPLUS release files by using the "Revise Parameters" option on
  786. the Installation menu.
  787.  
  788. The INSTALL program also gives an opportunity (via the Installation menu) to
  789. set the destination directory for each installed file or for classes of files.
  790. If the directory is not specified for a file, the following assumptions will
  791. apply:
  792.  
  793.  * If an ANSIPLUS file name matches the name of a file in the default
  794.    directory, root directory, or on the system PATH of the destination drive,
  795.    then the ANSIPLUS file will be copied over the matched file (i.e., updated).
  796.    This is intended to make installation of ANSIPLUS updates a snap.
  797.  
  798.  * New files are added to a directory for each class of file (i.e., driver,
  799.    utility program, or documentation/other).  If any file in the class is being
  800.    updated, then the class directory will be the same as the updated files.
  801.    Otherwise, the class directory will be "\ANSIPLUS".
  802.  
  803. It is recommended that you put all of the ANSIPLUS utility programs (SETCOLOR,
  804. SETAPLUS, ANSICOM, NEWAPLUS and APLUSLIB) on your system PATH so that they can
  805. be used easily.  It is critical that the execution library, APLUSLIB.exe, be
  806. located either in the same directory as the other utility programs or on the
  807. system PATH.  If it is not, the utility programs will not run!  You may also
  808. want to place the ANSIPLUS.sys device driver in the root directory.
  809.  
  810. For those who are not content to use default driver feature and other settings,
  811. after the release files have been copied to the target drive, the configuration
  812. section of the INSTALL program lets the user set the startup (boot) driver
  813. table sizes, colors, and feature settings, as well as high memory loading
  814. options that affect CONFIG.sys.  These configurations can be performed either
  815. at installation time, or any time later on an installed drive by using the
  816. NEWAPLUS.exe program.  Context sensitive help (via the F1 key) is provided for
  817. all entries.  Startup configuration changes are described in the following
  818. section, starting on page 15.
  819.  
  820. Before installing ANSIPLUS, or any other new device driver, be sure you have a
  821. bootable floppy disk as insurance against trouble getting your system to run
  822. after the device driver is installed.
  823.  
  824.  
  825.                                        11
  826.  
  827.  
  828. International Usage
  829.  
  830. If you are using the MS-DOS KEYB program to set up your keyboard, the following
  831. command MUST be executed after you load KEYB, otherwise most ANSIPLUS keyboard
  832. related features will not work:
  833.  
  834.             SETAPLUS LINK KEYEVENT
  835.  
  836. The INSTALL program will automatically add this command to your MS-DOS
  837. AUTOEXEC.bat file if it finds a reference in it to KEYB.  Relinking the key
  838. event interrupt is not necessary under Novell DOS with Novell's KEYB, because
  839. it is directly compatible with ANSIPLUS.
  840.  
  841. If you are using the DISPLAY.sys device driver for code page switching, the
  842. ANSIPLUS.sys device driver must be installed before DISPLAY.sys in your
  843. CONFIG.sys file.  The INSTALL program will automatically handle this in most
  844. cases.  However, under DOS 6.0+, if ANSIPLUS is installed in a configuration
  845. block that will be processed by MS-DOS after the configuration block that
  846. contains DISPLAY.sys, this situation will not be detected by INSTALL.  This
  847. must be corrected by directly editing CONFIG.sys.
  848.  
  849. Because of a bug in Microsoft Windows that prevents ANSIPLUS (or any other ANSI
  850. driver) from being localized when the DISPLAY.sys driver is also used, INSTALL
  851. will automatically add the following command to AUTOEXEC.bat:
  852.  
  853.             SETAPLUS LOCALCON
  854.  
  855. Or, if both KEYB.com and DISPLAY.sys are used, the command will be:
  856.  
  857.             SETAPLUS LINK KEYEVENT LOCALCON
  858.  
  859. See "ANSIPLUS and Windows 3" starting on page 43 for Windows configuration
  860. changes that you must make if you will be running Windows and DISPLAY.sys.
  861.  
  862. The "LOCALCON" keyword in the above commands causes the ANSIPLUS "CON" driver
  863. in memory to be renamed as "CONAPLUS".  Unfortunately, the MS-DOS CHCP command
  864. calls DOS Int 21h function 6602h, which searches the DOS device chain for the
  865. "CON" driver installed before DISPLAY.sys, and because it was renamed, reports
  866. an "Access Denied" error.  The best work-around depends on whether you will be
  867. using Windows:
  868.  
  869.  * If Windows will NOT be used, remove the word "LOCALCON" from the SETAPLUS
  870.    command in AUTOEXEC.bat; or
  871.  
  872.  * If Windows WILL be used, the CPCH.bat file supplied with ANSIPLUS should be
  873.    used as a replacement for the DOS CHCP command.  Thus, for example:
  874.  
  875.             CPCH 850
  876.  
  877.    will temporarily rename the ANSIPLUS driver as "CON", change the code page
  878.    to 850, and then rename the driver back to "CONAPLUS".
  879.  
  880.  
  881.  
  882.  
  883.  
  884.                                         12
  885. Disk Compression Utilities
  886.  
  887. On systems using Stacker or similar disk compression utilities that can change
  888. the hard disk drive letters around, INSTALL should still be able to locate
  889. CONFIG.sys, AUTOEXEC.bat or the ANSIPLUS driver file if it was previously
  890. installed.  When CONFIG.sys is not found on the (hard disk) target drive, other
  891. drives will be searched for it, starting with drive C:.  AUTOEXEC.bat is then
  892. assumed to reside on either the target drive or the same drive as CONFIG.sys.
  893. And if the ANSIPLUS driver is not found where CONFIG.sys says it will be, the
  894. same path on other drives will be searched for it as well.  In the event that
  895. these search rules still cannot locate the correct files, a system environment
  896. variable (SET ANSIPLUS=d:) may be used to identify the drive with CONFIG.sys
  897. and the ANSIPLUS driver, and this will override the search.
  898.  
  899. Memory Loading Optimizers
  900.  
  901. It is strongly recommended that ANSIPLUS be permanently excluded from automated
  902. memory loading optimizations, such as DOS 6+ MEMMAKER, QEMM OPTIMIZE, or 386MAX
  903. MAXIMIZE.  There are three reasons for this:
  904.  
  905.  * The ANSIPLUS "/U" memory loading option, which loads ANSIPLUS shared code to
  906.    upper memory blocks, is likely to confuse the optimizers because the driver
  907.    memory requirements change depending on whether ANSIPLUS is loaded low or
  908.    high, and when the driver is loaded low, ANSIPLUS allocates some upper
  909.    memory blocks itself.
  910.  
  911.  * Changes you make at a later date with the NEWAPLUS program to driver table
  912.    sizes can result in a larger load size for the ANSIPLUS driver.  This could
  913.    cause the driver or something loaded after it to be loaded low instead of
  914.    high, either because the driver is larger than the (QEMM) response file
  915.    expects, or it has become too large for everything to fit in the space
  916.    available.
  917.  
  918.  * ANSIPLUS has seven memory loading options that may be easily selected using
  919.    NEWAPLUS.exe.  Some of these options let you place part of the driver in EMS
  920.    memory or HMA, which the memory managers cannot do.  The memory managers
  921.    give only two choices: low or high.  You therefore have more control using
  922.    NEWAPLUS.
  923.  
  924. ANSIPLUS can be permanently excluded from MEMMAKER by adding a line containing
  925. "*ANSIPLUS" to the file MEMMAKER.inf.  Exclusion from QEMM's OPTIMIZE is
  926. accomplished by adding a line containing "ANSIPLUS" to the file OPTIMIZE.exc in
  927. the QEMM directory (create this file if it doesn't exist).
  928.  
  929. Loading ANSIPLUS as a TSR
  930.  
  931. The registered ANSIPLUS driver, ANSIPLUS.exe, can be loaded as a TSR, and this
  932. is the only recommended Terminate-and-Stay-Resident method for loading
  933. ANSIPLUS.  The ANSIPLUS INSTALL program will not automatically configure
  934. ANSIPLUS to be loaded in this manner, so the user must either modify CONFIG.sys
  935. to use an INSTALL= or INSTALLHIGH= command, or must change AUTOEXEC.bat to
  936. execute ANSIPLUS.exe as a program.  Once this has been done, however, NEWAPLUS
  937. will be able to find and reconfigure the ANSIPLUS.exe driver referred to by
  938. CONFIG.sys or AUTOEXEC.bat.
  939.  
  940. The Shareware ANSIPLUS.sys driver cannot be loaded directly as a TSR.  However,
  941. the Quarterdeck device driver loader DEVICE.com can be used to load the
  942.  
  943.                                        13
  944. Shareware driver as a TSR.  But because loading ANSIPLUS changes the system
  945. console, DEVICE does not completely install the driver, at least as far as the
  946. MS-DOS command shell, COMMAND.com, is concerned.  This can be corrected by
  947. entering a CTTY CON command after ANSIPLUS has been loaded.
  948.  
  949. The DEVLOD.com device driver loader, supplied with the book Undocumented DOS,
  950. is also able to load ANSIPLUS.sys, but it can also cause problems loading a new
  951. console device driver.  It changes all references to the old CON device in the
  952. DOS System File Table to point to the new console, which is correct under
  953. standard MS-DOS.  However, if DEVLOD is used to load ANSIPLUS.sys under Windows
  954. 3.1, the System File Table changes can cause a Windows crash when a second DOS
  955. session is started.
  956.  
  957. OS/2, DESQview and Task Switchers
  958.  
  959. Using ANSIPLUS with multitasking operating systems and task switchers is
  960. discussed in "ANSIPLUS and Multitaskers or Task Switchers", starting on page
  961. 47.  This section includes special information about OS/2, DESQview and other
  962. task switchers such as DOSSHELL.  Reading this section is especially important
  963. if you intend to use ANSIPLUS with DESQview.  Replacement CON drivers generally
  964. will not work correctly in a DESQview window, but if the right procedures are
  965. followed, ANSIPLUS Release 4.00 or later should be compatible.
  966.  
  967. Examples
  968.  
  969. The following examples illustrate using INSTALL to install ANSIPLUS:
  970.  
  971.  * If you received ANSIPLUS on a floppy disk and want to install it on your
  972.    hard disk, use the following installation procedure:
  973.  
  974.      (1) Set the default directory to the hard disk (i.e., get a C> prompt).
  975.      (2) Insert the ANSIPLUS diskette in drive A: (or other floppy drive).
  976.      (3) Enter the following command:
  977.  
  978.             A:INSTALL
  979.  
  980.  * If you received ANSIPLUS as a ZIP file (named ANSIPLUS.zip in this example),
  981.    use the following procedure:
  982.  
  983.      (1) Create a temporary sub-directory on the hard disk to contain the
  984.          unzipped ANSIPLUS files.  Move ANSIPLUS.zip to this directory and make
  985.          it be the default directory.  This directory must be different from
  986.          the directory that will receive the installed ANSIPLUS files.
  987.      (2) Unzip the files into the directory with the command:
  988.  
  989.             PKUNZIP ANSIPLUS
  990.  
  991.      (3) Then enter the command:
  992.  
  993.             INSTALL
  994.  
  995.          After installation is complete, you may delete the files in the
  996.          temporary sub-directory (but keep the ZIP file as a backup).
  997.  
  998.  * To install ANSIPLUS on bootable disk B:, from hard disk directory C:\APLUS,
  999.    enter the command:
  1000.  
  1001.             C:\APLUS\INSTALL B:
  1002.                                         14
  1003.  
  1004.                 CHANGING THE ANSIPLUS STARTUP CONFIGURATION
  1005.  
  1006. Changes to the startup configuration for ANSIPLUS are made with the NEWAPLUS
  1007. program.  (INSTALL also lets you make these changes, but INSTALL.exe is
  1008. actually a tiny program that calls NEWAPLUS.exe to perform the installation.)
  1009. All changes that you make with the NEWAPLUS.exe program will take effect only
  1010. after you reboot your computer.
  1011.  
  1012. All startup configuration changes made by NEWAPLUS (except for the ANSIPLUS
  1013. loading option) are installed by changing tables in the ANSIPLUS driver file.
  1014. Because of this, some anti-virus software may complain that the driver file has
  1015. been altered after you have used NEWAPLUS.  Just ignore this complaint.
  1016.  
  1017. You run NEWAPLUS with a command of the form:
  1018.  
  1019.             NEWAPLUS <target>
  1020.  
  1021. where <target> is the drive letter for a bootable diskette or hard disk
  1022. partition with ANSIPLUS installed.  If <target> is omitted, the drive that was
  1023. originally used to load MS-DOS will be selected.  After NEWAPLUS confirms that
  1024. the target disk contains ANSIPLUS, you are presented with a startup
  1025. configuration menu that has twelve revision option groups:
  1026.  
  1027. Initial Colors
  1028.  
  1029.  * Color selection sub-menus let you choose from the current 16-color palette
  1030.    the screen colors that will be used for text foreground and background when
  1031.    the system starts up.  ANSIPLUS maintains two sets of foreground and
  1032.    background colors: those that are currently on the screen, and "default"
  1033.    colors to be applied when an ANSI Set Graphics Rendition reset (i.e., Esc
  1034.    [0m) is detected.  The startup selections for both color combinations can be
  1035.    controlled from this sub-menu.
  1036.  
  1037. Palette Definition
  1038.  
  1039.  * The color palette determines the precise colors you will see in 16 color
  1040.    video modes.  ANSIPLUS maintains two palettes: the current palette on the
  1041.    screen, and a default palette that is loaded when ANSIPLUS first starts and
  1042.    whenever the video display mode is changed.  All changes you make using the
  1043.    NEWAPLUS color palette option will apply to the default palette.
  1044.  
  1045. Border Color
  1046.  
  1047.  * The border color is generated for the "overscan" region on the outside edges
  1048.    of the screen.  You can select any available color as the default border
  1049.    color, which will be installed when ANSIPLUS starts up and whenever the
  1050.    display mode is set.
  1051.  
  1052. Version
  1053.  
  1054.  * ANSIPLUS 4.00 or later lets you select between two device drivers: the full
  1055.    driver ("ANSIPLUS"), and a reduced capability driver ("ANSIPLSR").  The only
  1056.    advantage of the reduced capability driver is that it requires about 35
  1057.    percent less memory after it is loaded.  To save this memory, five ANSIPLUS
  1058.    features are removed: Scroll-back, copy/paste, direct output to video RAM in
  1059.    graphics mode, graphics mode text treatments, and monochrome VGA emulation
  1060.    on a color VGA.
  1061.                                        15
  1062.  
  1063.  
  1064. Loading Option
  1065.  
  1066. ANSIPLUS can be loaded into memory up to seven different ways, depending on
  1067. your computer's capabilities and what is contained in CONFIG.sys:
  1068.  
  1069.  * ANSIPLUS can be loaded into low memory below 640K. This is the default.
  1070.    The following CONFIG.sys command loads ANSIPLUS to low memory:
  1071.  
  1072.        DEVICE=ANSIPLUS.sys
  1073.  
  1074.  * ANSIPLUS can load itself into upper memory blocks.  At load time, the driver
  1075.    can divide itself into two sections: sharable code totaling 13K to 28K
  1076.    depending on driver version and available upper memory, and unsharable code/
  1077.    data totaling 5K to 11K.  The shared code can be placed in XMS upper memory
  1078.    blocks (from 640K to 1M), in high memory (1M to 1M+64K), or in expanded
  1079.    memory (EMS), leaving only the unsharable 5K to 11K in low memory.  Under
  1080.    DOS 5.0 or later, this option should work whether DOS=UMB appears in
  1081.    CONFIG.sys or not.  The following CONFIG.sys command loads ANSIPLUS into the
  1082.    XMS upper memory blocks:
  1083.  
  1084.        DEVICE=ANSIPLUS.sys /U
  1085.  
  1086.  * ANSIPLUS can load itself into the high memory addressed just above 1
  1087.    megabyte (the "HMA").  Under DOS 5.0 or later, with the DOS=HIGH line in
  1088.    CONFIG.sys, ANSIPLUS shares this memory with DOS; if DOS=HIGH is not used,
  1089.    but an XMS driver is installed, the HMA is obtained from the XMS driver; or,
  1090.    for earlier DOS versions or systems not using an XMS driver, the HMA is
  1091.    taken in the same manner as the VDISK.sys driver allocates extended memory.
  1092.    When ANSIPLUS is loaded into the HMA, certain (antique) programs that assume
  1093.    memory addresses over one megabyte will "wrap around" to addresses starting
  1094.    at zero may not operate correctly.  If you experience any problems, load
  1095.    ANSIPLUS into XMS upper memory blocks, expanded memory or low memory
  1096.    instead.  The following CONFIG.sys command will load ANSIPLUS into the high
  1097.    memory area:
  1098.  
  1099.        DEVICE=ANSIPLUS.sys /H
  1100.  
  1101.  * ANSIPLUS can load itself into expanded memory (EMS) which conforms to LIM
  1102.    (Lotus-Intel-Microsoft) Specification 4.0, eliminating the need for up to
  1103.    28K of scarce UMB, HMA or low memory resources.  This loading method is not
  1104.    recommended unless you really need to free up the extra memory.  Executing
  1105.    in EMS carries a performance penalty because the EMS pages must be mapped
  1106.    and restored each time ANSIPLUS needs to execute in EMS, and this can be
  1107.    especially noticeable under Windows.  And because expanded memory may be
  1108.    shared with other programs, drivers or TSRs, there is a chance of a software
  1109.    interaction that may prevent an application from running, keep Windows from
  1110.    loading, or cause the system to fail.  (For example, Version 6 of 386MAX
  1111.    will refuse to let Windows start in 386 Enhanced mode when ANSIPLUS is
  1112.    running in EMS.  This limitation does not exist for the EMM386 or QEMM386
  1113.    memory managers.) If you experience any problems using ANSIPLUS in EMS, do
  1114.    not use the feature.  Load ANSIPLUS into XMS upper memory, the HMA, or low
  1115.    memory instead.  The following CONFIG.sys command will load ANSIPLUS into
  1116.    expanded memory:
  1117.  
  1118.        DEVICE=ANSIPLUS.sys /E
  1119.  
  1120.                                        16
  1121.  
  1122.  
  1123.  * ANSIPLUS can be loaded high by DEVICEHIGH or equivalent.  This method is not
  1124.    recommended for users of Windows 3.0 386 Enhanced Mode because the variables
  1125.    in the ANSIPLUS driver will not be localized.  Localization of upper memory
  1126.    blocks is done correctly by Windows 3.1.  See "ANSIPLUS and Windows 3,"
  1127.    starting on page 43 for a discussion of this issue if you are using Windows
  1128.    3.0.  The following CONFIG.sys command will load ANSIPLUS high using EMM386:
  1129.  
  1130.        DEVICEHIGH=ANSIPLUS.sys
  1131.  
  1132.  * ANSIPLUS can be loaded high, and then its shared code can be placed in HMA.
  1133.    This requires only 11K of XMS upper memory after ANSIPLUS has completed its
  1134.    initialization (5K for the reduced driver).  However, upper memory space for
  1135.    the entire driver must be available when it is first loaded:
  1136.  
  1137.        DEVICEHIGH=ANSIPLUS.sys /H
  1138.  
  1139.  * ANSIPLUS can be loaded high, and then its shared code can be placed in EMS:
  1140.  
  1141.        DEVICEHIGH=ANSIPLUS.sys /E
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.                                        17
  1180.  
  1181. Keyboard
  1182.  
  1183.  * By default, ANSIPLUS increases the keyboard buffer capacity to 128
  1184.    characters, which should hold at least as much as most users can type ahead
  1185.    accurately.  To expand the computer's keyboard buffer capacity, an extension
  1186.    buffer is retained within ANSIPLUS, and whenever the ROM BIOS buffer has
  1187.    space available for keys held in the ANSIPLUS buffer, they are moved into
  1188.    the standard ROM BIOS buffer.  You configure this buffer by specifying the
  1189.    total number of keys to be buffered.
  1190.  
  1191.  * The keyboard repeat rate determines how fast keys will be generated when a
  1192.    key is held down and not lifted.  For systems with enhanced keyboards,
  1193.    ANSIPLUS lets this rate be configured anywhere from 2 to 300 characters per
  1194.    second.  For most applications, an ANSIPLUS repeat rate setting greater than
  1195.    30 characters per second will take precedence over the keyboard repeat rate
  1196.    set by other programs, such as the DOS MODE program.  Because of imprecise
  1197.    timing under Windows, however, this feature is disabled when Windows is
  1198.    running.  If desired, it may also be disabled entirely to use the standard
  1199.    rate.
  1200.  
  1201.  * The keyboard typematic delay, which determines how long a key must be held
  1202.    down before repeated keys will start to be generated, is also configurable.
  1203.    ANSIPLUS accepts four settings from 250 ms to 1000 ms.
  1204.  
  1205.  * Normally, the Caps Lock key locks the alphabetic keys in upper case, and
  1206.    when a shift key is held down, letters are entered in lower case.  This
  1207.    continues until Caps Lock is pressed again to unlock the Caps, and can often
  1208.    be confusing if you forget that Caps were locked.  ANSIPLUS has an option to
  1209.    have shift+alphabetic keys cause the Caps to unlock, much like a typewriter
  1210.    releases its shift lock whenever a shift key is pressed.
  1211.  
  1212.  * In many cases, when Caps Lock has been released by a shift+alphabetic key
  1213.    combination, mixed upper and lower case characters are needed for only a
  1214.    single entry, and Caps Lock should be reinstated thereafter.  ANSIPLUS
  1215.    includes an option to turn Caps Lock back on again when the Enter key is
  1216.    pressed after Caps were unlocked by a shift+alphabetic key, thus restoring
  1217.    Caps Lock on completion of an "entry."
  1218.  
  1219.  * For those users who find it more convenient to break out of programs with
  1220.    the Ctrl+C key combination than with Ctrl+Break, ANSIPLUS has an option to
  1221.    generate a keyboard break whenever Ctrl+C is entered.
  1222.  
  1223.  * The "Non-Destructive" read function of the DOS driver reads an input key
  1224.    from the keyboard unofficially just to see what it is, allowing it to really
  1225.    be read later.  This function is used to see what has been typed, and to
  1226.    read it or flush the keyboard buffer only if it matches some criterion (such
  1227.    as Escape or Ctrl+C).  Because the standard DOS keyboard driver always looks
  1228.    at the first key in the buffer, if it doesn't meet the criterion, no matter
  1229.    what is typed later will not be checked.  ANSIPLUS gets around this with an
  1230.    option to return the last key from the buffer instead of the first.
  1231.  
  1232.  * Key stacking can be disabled to use another key stacking driver (for
  1233.    example, NDOS KEYSTACK.sys), or when typing files that contain unknown ANSI
  1234.    escape sequences that might execute undesired commands.  When disabled, a
  1235.    warning tone will sound on any attempt to stack keys by ANSI escape
  1236.    sequence.
  1237.  
  1238.                                        18
  1239.  
  1240.  
  1241. Assigning Keys
  1242.  
  1243.  * ANSIPLUS has the ability to translate single keystrokes to full commands or
  1244.    other pre-determined key sequences.  This feature is called key
  1245.    reassignment, and it can be enabled or disabled without affecting the
  1246.    contents of the key reassignment tables stored within the ANSIPLUS device
  1247.    driver.
  1248.  
  1249.  * Ordinarily, key reassignment applies only to input keys requested from DOS,
  1250.    so programs that bypass DOS and use BIOS Interrupt 16h for keyboard input
  1251.    will not have any keys reassigned.  This is usually desirable, since major
  1252.    applications generally have built-in assumptions about the meaning of
  1253.    function and Alt keys, and these should be operative.  An ANSIPLUS feature
  1254.    is provided for those cases when you want to reassign keys for applications
  1255.    that bypass DOS and use Int 16h for keyboard input.  If you enable this
  1256.    feature, key reassignment will apply to all keystrokes entered through both
  1257.    Int 16h and DOS.  If it is disabled, key reassignment will only apply for
  1258.    keys requested from DOS.
  1259.  
  1260.  * ANSIPLUS can also prevent ANSI key reassignment redefinition.  This can be
  1261.    useful before trying ANSI files that contain unknown ANSI sequences that
  1262.    might redefine keys to execute undesired commands.  A warning tone (like the
  1263.    theme from "Dragnet") will sound whenever an attempt to redefine a key
  1264.    reassignment is detected.  If this feature is enabled by either NEWAPLUS or
  1265.    SETAPLUS, SETAPLUS must be used to disable it -- it cannot be disabled by an
  1266.    escape sequence alone.
  1267.  
  1268.  * The space allocated for storing ANSI keystroke reassignments may also be
  1269.    configured.  Each key reassignment requires approximately four bytes plus
  1270.    the length of the reassignment.  You configure the total table size in
  1271.    bytes.  If you save and restore key reassignments with the PUSHKEYS.com and
  1272.    POPKEYS.com programs, the storage space must be large enough for all saved
  1273.    ke reassignments plus the current reassignments.
  1274.  
  1275.  
  1276. Tone Definition
  1277.  
  1278.  * The ANSIPLUS driver includes a timer-interrupt controlled Ctrl+G beep tone
  1279.    generator that lets the beep tone be finished in parallel with subsequent
  1280.    processing.  Multiple beeps are ignored if a tone is currently being output,
  1281.    so programs cannot be slowed down by a rapid series of beeps.  The tone
  1282.    generator is used for both standard DOS console output and BIOS Int 10h
  1283.    Write TTY calls.  If the tone generator is disabled, the original DOS beep
  1284.    tone will be used.
  1285.  
  1286.  * When Windows 3 is running in 386 Enhanced mode, and a DOS program running in
  1287.    the background outputs a Ctrl+G, the background program's virtual 8086 may
  1288.    not be running fast enough to accurately time the tone.  Because of this,
  1289.    the tone can drag out and sound strange.  Disabling ANSIPLUS tone generation
  1290.    under Windows restores the original Windows sound driver, but makes the tone
  1291.    frequency and duration non-configurable.
  1292.  
  1293.  * The beep tone definition is stored in a table in the ANSIPLUS driver that
  1294.    requires four bytes per frequency and duration.  You can configure the size
  1295.    of this table by specifying the maximum number of notes allowed in the beep.
  1296.  
  1297.                                        19
  1298.  
  1299.  
  1300. Color Control
  1301.  
  1302.  * The ANSIPLUS driver ordinarily traps all video mode changes and installs the
  1303.    palette and/or DAC colors of the user's, or of ANSIPLUS's default color
  1304.    scheme.  Applications that set their own palettes will continue to do so,
  1305.    but those that do not will use the installed color choices.  If this feature
  1306.    is disabled, the VGA/EGA controller manufacturer's colors (the "OEM" colors)
  1307.    will be loaded when the video mode changes.
  1308.  
  1309.  * Some 256-color DOS applications assume that the OEM 256-color palette has
  1310.    been loaded when the 256-color mode was selected, and never define the
  1311.    colors that they will use.  A feature is provided to disable ANSIPLUS color
  1312.    loading for DOS 256-color modes if you are running such an application.
  1313.  
  1314.  * Some 256-color drivers for Windows apparently assume that the OEM 256-color
  1315.    palette has been loaded when the 256-color mode was selected, and never
  1316.    define the colors that Windows will use.  Because of this, ANSIPLUS normally
  1317.    does not load its default colors when a 256-color mode is selected under
  1318.    Windows.  However, a separate feature is provided to allow this if desired.
  1319.  
  1320.  * In color text modes, the VGA and EGA allow either sixteen background colors
  1321.    with no blinking foreground text, or eight background colors with foreground
  1322.    text that may or may not blink.  In monochrome text mode 07h, when blinking
  1323.    is disabled there are three backgrounds possible: black, gray or white, and
  1324.    with blinking enabled there are two: black and gray.  If blinking is
  1325.    disabled, ANSIPLUS will display sixteen (or three) background colors, and
  1326.    when it is enabled, you will see only eight (or two) background colors.
  1327.  
  1328.  * ANSIPLUS highlights user-typed keys when they are displayed on the screen,
  1329.    giving a clear visual separation of typed entries from computer output.
  1330.    Over dark backgrounds, the key is shown in white, and over light backgrounds
  1331.    it is shown in black.  If this feature is not wanted, it can be disabled.
  1332.  
  1333.  * Because application developers with VGA color monitors sometimes need to see
  1334.    how their systems will look when run with a VGA monochrome monitor, ANSIPLUS
  1335.    provides emulation of monochrome monitor VGA on a color monitor.  In normal
  1336.    operation, this feature should be disabled.
  1337.  
  1338.  * When the VGA/EGA video controller does not allow setting a palette register
  1339.    unless a vertical retrace is in progress, or when "snow" or other problems
  1340.    occur during palette color changes, ANSIPLUS provides an option to wait for
  1341.    a vertical retrace whenever setting a palette register.  Otherwise, this
  1342.    feature should remain disabled.
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.                                        20
  1357. Display Control
  1358.  
  1359.  * The ANSIPLUS screen saver blanks the VGA/EGA screen after several minutes of
  1360.    screen, keyboard and mouse inactivity.  The screen is brought back by any
  1361.    keystroke, including shift keys, or, if a mouse is connected, by moving it
  1362.    or pressing a button.  The screen saver is automatically disabled when not
  1363.    in full screen DOS sessions under OS/2 or Windows, in DESQview, and when
  1364.    games or other programs that change the timer are running, and does not
  1365.    interfere with any known programs.  However, if this feature is not desired,
  1366.    it can be turned off.
  1367.  
  1368.  * The time of inactivity before the screen goes blank is configurable between
  1369.    one and thirty minutes.
  1370.  
  1371.  * The ANSIPLUS screen blanking technique, which sets the VGA sequencer clock
  1372.    mode register, apparently is incompatible with a few VGA controllers (eg.,
  1373.    Cirrus Logic GD610/20).  For such controllers, a special feature is provided
  1374.    to select an alternative (EGA compatible) method which blanks the screen
  1375.    using the attribute controller instead.
  1376.  
  1377.  * As a "last resort" test for system activity, the screen saver can read scan
  1378.    codes from the keyboard controller at port 60h.  This test should only be
  1379.    needed when you are running an application that completely takes over all
  1380.    keyboard interrupts and directly controls the screen display as well.  On
  1381.    some computers, enabling this feature can interfere with processing of the
  1382.    arrow and page up/down keys on enhanced keyboards, or with a PS/2 type
  1383.    mouse, so the feature should be disabled unless it is really needed to keep
  1384.    the screen saver from blanking the screen during a specific application.
  1385.  
  1386.  * During periods of keyboard inactivity, ANSIPLUS's screen saver uses MS mouse
  1387.    Int 33h calls to test the status of the mouse.  In the unlikely event these
  1388.    calls interfere with the mouse driver, they can be disabled.
  1389.  
  1390.  * On the IBM PS/2, the mouse is usually connected to the pointing device port,
  1391.    and mouse activity will cause interrupts on the Mouse Event interrupt number
  1392.    74h, so ANSIPLUS monitors this interrupt to unblank the screen.  If this
  1393.    interrupt is used for another purpose on your computer, this feature should
  1394.    be disabled.
  1395.  
  1396.  * The DOS console drivers do not show a cursor on the screen when using a
  1397.    graphics mode.  ANSIPLUS can display a pseudo-cursor when keyed entries are
  1398.    requested by DOS in a graphics mode.  If this feature is desired, it can be
  1399.    enabled.  If it interferes with the appearance of a graphics mode program,
  1400.    it should be left disabled.
  1401.  
  1402.  * Because almost all applications that use 256-color graphics modes assume
  1403.    that DOS does not place a cursor on the screen, the ANSIPLUS pseudo-cursor
  1404.    is normally disabled when in a 256-color mode.  If desired, you can enable
  1405.    the cursor.
  1406.  
  1407.  * Programs that write screen output using ROM BIOS Int 10h Function 14 (Write
  1408.    TTY) ordinarily cannot use ANSI Escape sequences for screen control.
  1409.    ANSIPLUS includes a feature to allow this.
  1410.  
  1411.  * ANSIPLUS contains an internal storage area for saving and restoring driver
  1412.    context information (rows and columns, colors, display modes, etc.).  The
  1413.    default size allows 25 items to be saved, but this can be configured to a
  1414.    larger value if needed.
  1415.                                        21
  1416. Screen Scroll-Back
  1417.  
  1418.  * As lines are scrolled off the top of the screen, the ANSIPLUS driver can
  1419.    save them for later viewing.  This viewing is called screen scroll-back.
  1420.    Most of the time this is a very useful and unobtrusive feature, but if it is
  1421.    not desired, or if storage of the saved lines in either expanded memory
  1422.    (EMS) or unused portions of the video RAM is found to interfere with
  1423.    something, it can be disabled.
  1424.  
  1425.  * Ordinarily, when ANSIPLUS is initialized by DOS, it will try to allocate 64K
  1426.    of expanded memory (LIM EMS 4.0) for scroll-back.  When EMS is used for
  1427.    scroll-back, storage capacity will be about 1,000 lines, and the scroll-back
  1428.    data will be preserved as long as the computer is on.  (If the ANSIPLUS
  1429.    shared code was loaded into EMS, it will share the same 64K area as scroll-
  1430.    back, reducing capacity by 40 percent.) If EMS memory is unavailable, then
  1431.    scroll-back will be stored in unused portions of the video RAM instead,
  1432.    cutting capacity to about 500 lines, which will be lost every time the
  1433.    display mode changes.  A configurable feature is provided that can prevent
  1434.    DOS EMS memory from being allocated for scroll-back and force any
  1435.    scroll-back data to reside in video RAM.
  1436.  
  1437.  * Under Windows, when a 386 Enhanced Mode DOS session starts, ANSIPLUS will
  1438.    try to allocate 64K of private expanded memory (EMS) for scroll-back (48K if
  1439.    ANSIPLUS shared code was loaded into EMS).  If the EMS is not available (for
  1440.    example, if the Windows PIF file for the application does not provide
  1441.    expanded memory), then video RAM will be used for scroll-back instead.
  1442.    ANSIPLUS provides a configurable feature that can prevent Windows EMS from
  1443.    being allocated for scroll-back and force any Windows DOS session
  1444.    scroll-back to reside in video RAM.  This is not recommended, however,
  1445.    because scroll-back in video RAM under Windows is not reliable when used
  1446.    with many Windows video drivers.
  1447.  
  1448.  * The recommended location for scroll-back data under Windows is expanded
  1449.    memory (EMS).  When EMS memory cannot be used, if you want to use
  1450.    scroll-back under Windows, you must enable a feature that allows using video
  1451.    RAM for scroll-back instead.  When running DOS applications in 386 Enhanced
  1452.    Mode, Windows will not maintain a full 32K of text mode RAM unless the
  1453.    Windows PIF file specifies "High Graphics" and "Retain Video Memory", and
  1454.    even then some Windows 3.1 video drivers (eg., 256-color ET-4000) will not
  1455.    work correctly when video RAM outside the visible screen is accessed,
  1456.    resulting in loss of scroll-back text or incomplete updating of the screen.
  1457.    You therefore should exercise caution before relying on this feature.  For
  1458.    further information, see "ANSIPLUS and Windows 3" starting on page 43.
  1459.  
  1460.  * Another feature only applies when video RAM is used instead of EMS to hold
  1461.    scroll-back data.  On systems running a suitable XMS driver such as QEMM or
  1462.    HIMEM, ANSIPLUS can allocate XMS memory to hold scroll-back data when
  1463.    changing video modes or running graphics applications (including Windows).
  1464.    DOS sessions under Windows 3.1 can also use XMS memory for this purpose if
  1465.    they are run from a PIF file that provides at least 32K of XMS memory.  If
  1466.    ANSIPLUS is loaded into the High Memory Area (HMA) and is not sharing this
  1467.    area with DOS, then scroll-back will be preserved in HMA instead of XMS
  1468.    memory.  Because calls to some XMS drivers may require a lot of stack space,
  1469.    this feature should be disabled if you have reliability problems during
  1470.    display mode changes.  And because the feature is now rarely needed, if it
  1471.    is disabled at system bootup, the code to perform its function will be
  1472.    deleted from the driver (saving 650 bytes), and the feature will not
  1473.    operate.
  1474.                                        22
  1475.  
  1476.  
  1477.  * ANSIPLUS captures for scroll-back all standard DOS output that is scrolled
  1478.    off the top of the screen or cleared from the screen.  An option is provided
  1479.    to capture full lines scrolled off the top by BIOS calls, as well as screens
  1480.    not containing DOS output, when they are cleared by BIOS call.
  1481.  
  1482.    Under Windows 3.1, when a DOS session is running in a window, some Windows
  1483.    video drivers (for example, the Microsoft Windows 3.1 VGA driver) trap BIOS
  1484.    scrolling calls completely and do not pass them through to the DOS virtual
  1485.    8086, making it impossible for ANSIPLUS to reliably capture lines scrolled
  1486.    by BIOS call when Windows is running.
  1487.  
  1488.  * Every time that video page 0 (the normal video page for all DOS output) is
  1489.    cleared, the first through last non-blank lines on the screen (plus one
  1490.    above and below) are captured for scroll-back.  When the second and higher
  1491.    video pages are cleared, they will not be saved unless lines have been
  1492.    scrolled off the top.  An option is provided to capture the higher video
  1493.    pages too when they are cleared.
  1494.  
  1495.  * To simplify writing or adapting applications, ANSIPLUS has the ability to
  1496.    restrict DOS, ANSI and BIOS screen output to user-defined scrolling regions
  1497.    or "windows." Because scrolling regions are generally used only within
  1498.    applications, when a subscreen scrolling region is in effect, lines scrolled
  1499.    off the top of the region are not usually captured for scroll-back.  An
  1500.    option is provided to capture such lines.
  1501.  
  1502.  * When EMS memory is not used for scroll-back, ANSIPLUS stores captured screen
  1503.    lines in unused parts of the video RAM, with usage based on whether a
  1504.    display page has ever been selected for display.  Almost all text mode
  1505.    applications select a page before filling it with text, so ANSIPLUS should
  1506.    generally know what is used and what isn't.  However, a few applications,
  1507.    such as the Norton Utilities Version 7, appear to use the second video page
  1508.    without ever selecting it to save the original contents of the screen as the
  1509.    program starts up.  This action will wipe out any scroll-back data in the
  1510.    second page, and when the original screen is cleared by the program,
  1511.    scroll-back lines may be stored into the saved screen, causing gibberish to
  1512.    be restored to the screen when the program terminates.  To address this
  1513.    problem, a configurable feature is provided to protect the second video page
  1514.    from scroll-back storage.  However, when this feature is enabled, storage
  1515.    capacity for scroll-back in the video RAM will be reduced by one page.
  1516.  
  1517.  
  1518. Other
  1519.  
  1520.  * ANSIPLUS uses the Scroll-Lock key as a hot key for freezing fast screen
  1521.    output and for activating screen scroll-back.  If these features are not
  1522.    desired, or to run those few applications that use Scroll-Lock for other
  1523.    purposes, the ANSIPLUS Scroll-Lock key can be disabled.  However, before you
  1524.    completely disable ANSIPLUS's Scroll-Lock key, try the Alt+Scroll-Lock
  1525.    combination instead (see next option).
  1526.  
  1527.  * An alternative hot key is Alt+Scroll-Lock.  If this key is enabled, the Alt
  1528.    key must be pressed simultaneously with the Scroll-Lock key to cause the
  1529.    ANSIPLUS Scroll-Lock function to be activated.  If it is disabled, the
  1530.    Scroll-Lock key will function with or without any other simultaneous key.
  1531.  
  1532.  
  1533.                                        23
  1534.  
  1535.  
  1536.  * Smooth scrolling can gradually move the entire screen's text up so it can be
  1537.    read while it moves.  This feature can also be toggled on and off by the
  1538.    Shift+Scroll Lock key combination.  Smooth scrolling will appear
  1539.    unacceptably choppy on computers with lower powered CPUs and/or video
  1540.    controllers that cannot move a full screen of text in the video RAM
  1541.    completely during a vertical retrace.  If this occurs, the feature should
  1542.    not be used.
  1543.  
  1544.  * Because scrolling performance is reduced when Windows is running, smooth
  1545.    scrolling under Windows may appear jerky even though it works correctly
  1546.    under DOS.  Smooth scrolling also may interfere with many Windows video
  1547.    display drivers when the DOS session is run in a window, not full screen.
  1548.    For example, the 256-color drivers for the Tseng ET4000 may leave undrawn
  1549.    black areas on the screen when scrolling occurs in a window while smooth
  1550.    scrolling is active.  Because of these problems, smooth scrolling is
  1551.    disabled by default under Windows, and is kept disabled unless the VWFD.386
  1552.    Windows virtual device driver (VxD) is installed.  See "ANSIPLUS and Windows
  1553.    3" starting on page 43 for further information.
  1554.  
  1555.  * Because it takes time to smoothly scroll the screen, smooth scrolling of
  1556.    large amounts of screen output can significantly delay the computer.  An
  1557.    option is provided to increase the scrolling rate when the smooth scrolling
  1558.    operation is taking a significant proportion of the computer's time.  This
  1559.    can help, for example, to prevent data overruns when smooth scrolling is
  1560.    used with a communications program that scrolls the entire screen.
  1561.  
  1562.  * ANSIPLUS normally handles all text mode scrolling itself directly in the
  1563.    video display RAM.  This may confuse some other device drivers or TSRs that
  1564.    are installed and need to know when the screen is being scrolled.  In such
  1565.    cases, a feature can be enabled to cause BIOS calls for screen scrolling.
  1566.  
  1567.  * In full screen operation, ANSIPLUS should automatically detect whether the
  1568.    current running program is using the mouse, and not try to take over the
  1569.    mouse for copy and paste.  In case this mouse activity detection logic
  1570.    fails, and ANSIPLUS interferes with a program's mouse usage, a configurable
  1571.    feature is provided to correct the problem by keeping ANSIPLUS from taking
  1572.    over the mouse unless the screen has been frozen by the Scroll Lock key.
  1573.  
  1574.    This feature affects only standard DOS and full screen Windows or OS/2
  1575.    sessions, because ANSIPLUS always requires that Scroll Lock be on before it
  1576.    takes over the mouse in windowed OS/2 or Windows sessions or in DESQview
  1577.    windows.  This keeps the mouse from being activated as you move it from
  1578.    window to window or when you leave the mouse cursor sitting over an ANSIPLUS
  1579.    DOS window.
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.                                        24
  1593. IV.  USING ANSIPLUS
  1594.  
  1595. This chapter describes your controls over ANSIPLUS when it is running.  Five
  1596. subjects are covered: special keyboard and mouse functions; selecting and
  1597. defining colors with the SETCOLOR.exe utility program; controlling other
  1598. ANSIPLUS features with the SETAPLUS.exe utility program; creating batch files
  1599. for configuring applications; and editing ANSI-type escape sequence programs
  1600. and files with the ANSICOM.exe program.
  1601.  
  1602.                      SPECIAL KEYBOARD AND MOUSE FUNCTIONS
  1603.  
  1604. Hot Keys
  1605.  
  1606. To access its special keyboard control functions, ANSIPLUS uses three hot key
  1607. combinations, all involving the Scroll-Lock key:
  1608.  
  1609.  * To activate scroll freeze, scroll-back, and copy/paste, use the Scroll-Lock
  1610.    key alone, or combine it with the Alt key:
  1611.  
  1612.      Scroll-Lock          Enable or disable Scroll Lock: scroll freezing,
  1613.                           scroll-back and copy/paste
  1614.      Alt+Scroll-Lock      Enable or disable Scroll Lock (alternative keys)
  1615.  
  1616.  * To turn smooth scrolling on and off, add a Shift key:
  1617.  
  1618.      Shift+Scroll-Lock    Enable or disable smooth scrolling
  1619.  
  1620.  * To blank the screen immediately (if the ANSIPLUS screen saver is enabled),
  1621.    add Alt and Ctrl keys to Scroll-Lock, or use the alternative Alt+Shift+Num
  1622.    Lock key combination:
  1623.  
  1624.     Alt+Ctrl+Scroll-Lock  Blank the screen immediately
  1625.     Alt+Shift+Num Lock    Blank the screen immediately (alternative keys)
  1626.  
  1627.  
  1628. Scroll Lock
  1629.  
  1630. When your Scroll-Lock toggle is recognized by the computer, you will hear a
  1631. short tone.  When the screen is frozen by Scroll-Lock, (as indicated by the
  1632. Scroll Lock light on enhanced keyboards), normal key input is disabled and the
  1633. following keys apply:
  1634.  
  1635.   Home          Go to the top of the lines saved for scroll-back
  1636.   PageUp        Scroll up one page
  1637.   Shift+Tab     Scroll up one-half page
  1638.   Up arrow      Scroll up one line
  1639.  
  1640.   End           Go to the bottom (i.e., the original screen display)
  1641.   PageDn        Scroll down one page
  1642.   Tab           Scroll down one-half page
  1643.   Down arrow    Scroll down one line
  1644.  
  1645.   Ctrl+Home     Delete all scroll-back older than that visible on the screen
  1646.   Ctrl+End      Delete all scroll-back visible on the screen or newer
  1647.  
  1648.   Left arrow    View a lower numbered display page
  1649.   Right arrow   View a higher numbered display page
  1650.  
  1651.                                        25
  1652.  
  1653.   Gray Plus     Set a bookmark at the current scroll-back location
  1654.   Gray Enter    Display the next bookmark location
  1655.  
  1656.   Escape        Cancel Scroll Lock, return to normal key processing
  1657.   Scroll lock   Cancel Scroll Lock, return to normal key processing
  1658.  
  1659.   Insert        Paste the current text selection to the keyboard from the
  1660.                 screen, the local clipboard or the Windows clipboard.  Then
  1661.                 cancel Scroll Lock (see "Copy and Paste" below)
  1662.  
  1663.   Ctrl+Insert   Signal that the arrow keys will be used to start a text
  1664.                 selection for copy and paste (see "Copy and Paste" below)
  1665.  
  1666.   Delete        Clear the clipboard
  1667.  
  1668. If you try to exceed the limit of travel up, down, left or right, a short low
  1669. pitched tone will sound.  If you enter any key other than those above, you will
  1670. hear a short warbling sound, Scroll Lock will be canceled, the screen will
  1671. return to its normal display, and the key will be passed back to the running
  1672. program.
  1673.  
  1674. If the screen was frozen during output, the PageDn, Tab and Down arrow keys
  1675. will allow one page, one-half page, and one line of additional output,
  1676. respectively, before freezing the screen again.  Pressing a Shift key will
  1677. release the screen as long as the shift key is held down.
  1678.  
  1679. Copy and Paste
  1680.  
  1681. ANSIPLUS supports copy and paste so that you can recover data or commands that
  1682. have scrolled off the screen without having to retype the data.  Under Windows,
  1683. this feature lets you copy text easily between a full screen text mode DOS
  1684. application and the Windows clipboard without having to switch to a window.
  1685.  
  1686. To hold text for later pasting to the keyboard, the ANSIPLUS driver contains a
  1687. local clipboard.  The default size of this clipboard is limited: 384 bytes plus
  1688. the amount of free space in the storage area for key reassignments, and the
  1689. driver will issue a buffer full tone if it ever overflows.  If this happens,
  1690. the local clipboard capacity can easily be increased by raising the size of the
  1691. ANSIPLUS key reassignment tables with the NEWAPLUS.exe configuration utility.
  1692.  
  1693. Whenever Scroll Lock is on, ANSIPLUS lets you use the mouse and/or keyboard to
  1694. select text, copy it to the clipboard, or paste it to the keyboard.  When
  1695. Scroll Lock is off, if the currently running program or command shell does not
  1696. use the mouse, the mouse may be used for copy and paste without requiring entry
  1697. of the Scroll-Lock key.
  1698.  
  1699. The local clipboard is cleared only when the first text selection is added to
  1700. it after Scroll Lock has been turned on, or when key input pasted from the
  1701. Windows clipboard is completed.  Thus, a series of text selections can be added
  1702. to the clipboard from various places on the screen or scroll- back, and then
  1703. left in the clipboard until you need to paste them.  Because the clipboard can
  1704. retain data for a long time, you should be sure of what is in your clipboard
  1705. before you paste to the keyboard.  In Windows, whenever selected text is saved
  1706. to the clipboard (by the Enter key or right mouse button click), the local
  1707. clipboard is automatically copied to the Windows clipboard so that other
  1708. programs may have access to the data.
  1709.  
  1710.                                        26
  1711.  
  1712. Pasting text to the keyboard is simple, once it has been selected or if it is
  1713. already present in the Windows clipboard: just hit the Insert key or click once
  1714. on the left mouse button after Scroll Lock is on.
  1715.  
  1716. Selecting text with the keyboard is a little more complicated because it
  1717. requires two steps: starting the selection by positioning the cursor to the
  1718. beginning of the text, and then extending the size of the selection.  Selecting
  1719. text with the mouse is covered below in "Using the Mouse".
  1720.  
  1721. The following keys are used when starting a text selection:
  1722.  
  1723.    Insert           Paste the local or Windows clipboard to the keyboard
  1724.    Escape           Cancel the text selection
  1725.    Delete           Clear the clipboard
  1726.    Space            Select the word at the cursor position
  1727.  
  1728.    Home             Move the cursor to the start of the current line
  1729.    End              Move the cursor to the end of line
  1730.  
  1731.    Up arrow         Move the cursor up one line
  1732.    Down arrow       Move the cursor down one line
  1733.    Left arrow       Move the cursor left one character
  1734.    Right arrow      Move the cursor right one character
  1735.  
  1736. Once a text selection appears on the screen (i.e., after hitting the Space bar
  1737. to select a word or after selecting something with the mouse), the following
  1738. keys can be used to extend and complete it:
  1739.  
  1740.    Insert           Paste the selection to the keyboard
  1741.    Alt+Insert       Paste selection, suppressing leading spaces on each line
  1742.    Enter            Complete the selection and add it to the clipboard
  1743.    Alt+Enter        Add selection to clipboard, suppressing leading spaces
  1744.  
  1745.    Escape           Cancel the text selection
  1746.    Delete           Clear the clipboard
  1747.    Space            Add a word to the selection
  1748.  
  1749.    Home             Extend the selection to the start of the current line
  1750.    End              Extend the selection to the end of line
  1751.  
  1752.    Up arrow         Extend the selection to the line above
  1753.    Down arrow       Extend the selection to the line below
  1754.    Left arrow       Delete the last character from the selection
  1755.    Right arrow      Add one character to the end of the selection
  1756.  
  1757.  
  1758. Using the Mouse
  1759.  
  1760. In order to use the mouse for copy and paste or for scrolling back, you must
  1761. first "wake it up" by moving it or pressing one of the buttons.  This tells
  1762. ANSIPLUS that the mouse will be used, and the mouse cursor will appear on the
  1763. screen.  If the program that is running already was using the mouse, then
  1764. Scroll Lock must be on or ANSIPLUS will NOT take control of the mouse.
  1765.  
  1766.  
  1767.  
  1768.  
  1769.                                        27
  1770.  
  1771. In full screen operation, ANSIPLUS should automatically detect whether the
  1772. current running program is using the mouse, and not try to take over the mouse
  1773. for copy and paste.  In windowed OS/2 or Windows sessions or in DESQview
  1774. windows, ANSIPLUS requires that Scroll Lock be on before it takes over the
  1775. mouse.  This keeps the mouse from being activated as you move it from window to
  1776. window or when you leave the mouse cursor sitting over an ANSIPLUS DOS window.
  1777.  
  1778. Once ANSIPLUS recognizes the mouse, if you move the mouse cursor to the top
  1779. line on the screen, the screen will scroll backward (turning on Scroll Lock if
  1780. necessary).  If the screen is scrolled back, moving the cursor to the bottom
  1781. line will cause the screen to scroll forward.
  1782.  
  1783. To select text, just move the mouse cursor to it and use any of the following
  1784. mouse functions:
  1785.  
  1786.    Left button drag    Select text by holding down the left mouse button
  1787.                        and dragging the mouse.
  1788.  
  1789.    Left single click   Paste the clipboard to the keyboard and cancel Scroll
  1790.                        Lock.  Any current text selection will be copied to the
  1791.                        local clipboard first, and if the local clipboard is
  1792.                        empty a copy of the Windows clipboard will be pasted.
  1793.                        This action is the same as hitting the Insert key.
  1794.                        There is one special case: If Scroll Lock was off and
  1795.                        the 4DOS/NDOS popup command history window was showing,
  1796.                        the current selected command will be executed as though
  1797.                        Enter was hit.
  1798.  
  1799.    Left double click   Select the word under the mouse cursor, or if the mouse
  1800.                        cursor is already within the text selection, add another
  1801.                        word to the selection.  This action is the same as
  1802.                        hitting the Space bar.
  1803.  
  1804.    Right single click  Add the current text selection to both the local and
  1805.                        Windows clipboards.  This is the same as hitting the
  1806.                        Enter key.  If there was no text selection, cancel
  1807.                        Scroll Lock, release the mouse, and return to normal key
  1808.                        entry (same as hitting the Escape key).
  1809.  
  1810.    Right double click  Cancel the current selection or Scroll Lock.  This is
  1811.                        the same as hitting the Escape key.
  1812.  
  1813.    Middle single click Same as the Page Up key, except when the 4DOS/NDOS
  1814.                        history window is showing, when it generates an Up
  1815.                        arrow.
  1816.  
  1817.    Middle double click Same as the Page Down key, except when the 4DOS/NDOS
  1818.                        history window is showing, when it is a Down arrow.
  1819.  
  1820. The act of selecting text will turn on Scroll Lock if it is not already on.  If
  1821. you have a two button mouse, the functions for the "middle" button can be
  1822. simulated by pressing both the left and right buttons simultaneously.
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.                                        28
  1829.  
  1830.                        SELECTING AND DEFINING COLORS
  1831.  
  1832. The SETCOLOR.exe utility program provides extensive control over colors for
  1833. your running system.  With this program, the user can view the current colors,
  1834. select colors for use, create and apply named color schemes, edit the color
  1835. palette, set the border color, and save and load color definitions.  Changes
  1836. made with SETCOLOR.exe are in effect only as long as your system is running.
  1837. To change the colors for system bootup, use the NEWAPLUS.exe program.
  1838. SETCOLOR.exe is executed by a command of the form:
  1839.  
  1840.         SETCOLOR <keyword> [<keyword> ...]
  1841.  
  1842. where each <keyword> selects a foreground or background color or other option.
  1843. If no <keyword> is supplied, you are presented with a menu of choices:
  1844.  
  1845.  * Color selection submenus let you choose from the current 16-color palette
  1846.    the screen colors that will be used for text foreground and background.
  1847.    ANSIPLUS maintains two sets of foreground and background colors: those that
  1848.    are currently on the screen, and default colors to be applied when an ANSI
  1849.    Set Graphics Rendition reset (i.e., Esc [0m) is detected.  You can control
  1850.    both color combinations from this sub-menu.
  1851.  
  1852.  * The color palette determines the precise colors you will see in 16 color
  1853.    video modes.  ANSIPLUS maintains two palettes: the current palette on the
  1854.    screen, and a default palette that is loaded when ANSIPLUS first starts and
  1855.    whenever the video display mode is changed.  You can control both palettes
  1856.    using this option, but unless you specifically set the default for each
  1857.    color you redefine, your colors will only apply until the next display mode
  1858.    change.
  1859.  
  1860.  * The border color is generated for the "overscan" region on the outside edges
  1861.    of the screen.  Again, ANSIPLUS maintains both a current border color and a
  1862.    default border color.  You can select any available color as border color,
  1863.    and can control both the current and default borders with this option.  As
  1864.    for palette changes, unless you specifically set the default border color,
  1865.    your border color will apply only until the next display mode change.
  1866.  
  1867. From the command line, colors may be selected by name or code number, where
  1868. codes 0-15 identify the 16 palette colors, 128-143 select foreground colors,
  1869. and 192-207 select background colors.  The relationship between color names and
  1870. code numbers is depicted in Table 4-1:
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.                                        29
  1888.  
  1889.        +--------------------------------------------------------+
  1890.        |                      Table 4-1                         |
  1891.        |                Color Names and Codes                   |
  1892.        +-------------------+--------+--------------+------------+
  1893.        |                   | Color  |  Foreground  | Background |
  1894.        | Color Name        |  Code  |     Code     |    Code    |
  1895.        +-------------------+--------+--------------+------------+
  1896.        | BLACK             |    0   |      128     |     192    |
  1897.        | DKGRAY            |    8   |      136     |     200    |
  1898.        | GRAY              |    7   |      135     |     199    |
  1899.        | WHITE             |   15   |      143     |     207    |
  1900.        | RED               |    9   |      137     |     201    |
  1901.        | DKRED             |    1   |      129     |     193    |
  1902.        | BROWN             |    3   |      131     |     195    |
  1903.        | YELLOW            |   11   |      139     |     203    |
  1904.        | GREEN             |    2   |      130     |     194    |
  1905.        | LTGREEN           |   10   |      138     |     202    |
  1906.        | CYAN              |    6   |      134     |     198    |
  1907.        | LTCYAN            |   14   |      142     |     206    |
  1908.        | BLUE              |    4   |      132     |     196    |
  1909.        | LTBLUE            |   12   |      140     |     204    |
  1910.        | MAGENTA or PURPLE |    5   |      133     |     197    |
  1911.        | LTMAGENTA or PINK |   13   |      141     |     205    |
  1912.        +-------------------+--------+--------------+------------+
  1913.  
  1914. In 256 color modes, you may also use 256-511 to select the foreground, 512-767
  1915. to select the background, or 0-255 after the BORDER keyword to select the
  1916. border color.
  1917.  
  1918. Several modifying keywords can assist the color selection:
  1919.  
  1920.     DARK, DIM or NORMAL for low intensity colors,
  1921.     LIGHT, BRIGHT or INTENSE for high intensity colors,
  1922.     FOREGROUND or FGD for foreground following,
  1923.     BACKGROUND,  BGD, or ON for background following,
  1924.     REVERSE to swap the current foreground and background,
  1925.     BORDER for border color selection following, or
  1926.     DEFAULT to select the current colors as the default colors.
  1927.  
  1928. If named colors or color codes 0-15 are specified without the foreground or
  1929. background keywords, then the first color is assumed to be the foreground and
  1930. the second the background.  Keywords may also be shortened; the first partial
  1931. match will be used.  Several examples may help to clarify these rules:
  1932.  
  1933.     SETCOLOR bgd blue                sets the background to dark blue
  1934.     SETCOLOR light cyan blue default default colors are light cyan foreground
  1935.                                      and blue background
  1936.     SETCOLOR 7,0                     gray foreground, black background
  1937.     SETCOLOR bright green on blue    high intensity green foreground, dark blue
  1938.                                      background
  1939.     SETCOLOR border cyan             set the border color to cyan
  1940.     SETCOLOR reverse                 reverses (swaps) the current foreground
  1941.                                      and background colors
  1942.     SETCOLOR rev                     reverses foreground and background
  1943.  
  1944.  
  1945.  
  1946.                                        30
  1947.  
  1948. Any unmatched keywords are checked against user-defined color schemes in a file
  1949. named SETCOLOR.sch.  This editable ASCII text file, which should be placed in
  1950. the same directory as the SETCOLOR.exe program, contains any number of named
  1951. color schemes of the user's choice.  User supplied color schemes are entered
  1952. into the file with a text editor, with each line entered in the form:
  1953.  
  1954.          <name> = <keyword> [<keyword> ...]
  1955.  
  1956. where <name> is the name of the user supplied color scheme, and <keyword> is
  1957. any valid SETCOLOR program keyword or other option.  Table 4-2 shows the
  1958. SETCOLOR.sch file included with ANSIPLUS as a sample:
  1959.  
  1960.                +---------------------------------------+
  1961.                |               Table 4-2               |
  1962.                |       Sample Color Schemes File       |
  1963.                +---------------------------------------+
  1964.                | evening = light cyan blue border 17   |
  1965.                | night = light blue black border 17    |
  1966.                | dawn = yellow cyan border 35          |
  1967.                | daylight = light blue white border 17 |
  1968.                | sun = bright red yellow border 46     |
  1969.                | sky = blue light blue border 17       |
  1970.                | forest = black green border 24        |
  1971.                | earth = yellow brown border 38        |
  1972.                | regal = pink purple border 21         |
  1973.                | candycane = dark red pink border white|
  1974.                | bw = gray black border dkgray         |
  1975.                +---------------------------------------+
  1976.  
  1977. A user color scheme may be specifically selected on the SETCOLOR command line
  1978. by preceding its name with the keyword SCHEME, for example:
  1979.  
  1980.   SETCOLOR SCHEME JOE selects a color scheme named JOE
  1981.  
  1982. The SETCOLOR program also includes keyword options to reset, edit, load and
  1983. save the current color configuration.  These include:
  1984.  
  1985.     RESET                 Install defaults as the current colors
  1986.     IBM or OEM            Install the OEM VGA/EGA palette as the current colors
  1987.     PALETTE               Edit the color definitions for the 16-color palette
  1988.     SAVEFILE <filename>   Save the current 16-color definitions in a file
  1989.     SAVE256 <filename>    Save the 256 VGA DAC color definitions in a file
  1990.     LOADFILE <filename>   Load a color definition file
  1991.     SAVECURRENT <file>    Save the 16 current colors as an executable program
  1992.     SAVEDEFAULT <file>    Save the 16 default colors as an executable program
  1993.     SAVEPROGRAM <file>    Save both the current and default colors as a program
  1994.  
  1995. The SAVEFILE, SAVE256 and LOADFILE keywords generate and load color definition
  1996. files.  The color definition files created by SAVEFILE contain 36 lines: 32
  1997. lines define the red, green and blue intensities for colors 0 to 15, both
  1998. current and default, and the other four define the current and default
  1999. foreground, background and border colors.  Files created by SAVE256 contain 512
  2000. lines: 256 for the default DACs and 256 for the current DACs.  Table 4-3 is a
  2001. sample of lines from a SAVEFILE color definition file.
  2002.  
  2003.  
  2004.  
  2005.                                        31
  2006.                       +------------------------------+
  2007.                       |          Table 4-3           |
  2008.                       | Sample Color Definition File |
  2009.                       +------------------------------+
  2010.                       |      Default = 142,196       |
  2011.                       |      DBorder = 0,81,162      |
  2012.                       |     DColor 2 = 16,162,81     |
  2013.                       |     DColor 3 = 113,65,16     |
  2014.                       |      DColor 4 = 0,0,105      |
  2015.                       |      DColor 5 = 97,0,97      |
  2016.                       |      Current = 135,192       |
  2017.                       |        Border = 0,0,0        |
  2018.                       |      Color 2 = 0,170,0       |
  2019.                       |     Color 3 = 0,170,170      |
  2020.                       |      Color 4 = 0,0,170       |
  2021.                       |     Color 5 = 170,0,170      |
  2022.                       +------------------------------+
  2023.  
  2024. Users are free to edit color definition files to create their own colors, to
  2025. delete any lines from them, or to put the lines in any order except that all
  2026. default color definitions must precede all current color definitions in the
  2027. file.  If no file name is given for a LOADFILE, SAVEFILE or SAVE256 request,
  2028. the file name SETCOLOR.def in the current directory will be used.  LOADFILE
  2029. checks the system PATH for color definition files to be loaded, so any commonly
  2030. used color files can reside in a directory on the PATH.
  2031.  
  2032. The SAVECURRENT, SAVEDEFAULT, and SAVEPROGRAM keyword options create executable
  2033. ".com" files that can be called later by name to install colors.  These
  2034. programs can also be edited by the ANSICOM.exe utility program.
  2035.  
  2036. To provide additional user control over 16-color programs, such as DBASE III or
  2037. DOS 5.0 EDIT.com, that set their own palettes or border colors but do not
  2038. restore the palette on completion, or to simply force a color scheme on a
  2039. program that defines its own, ANSIPLUS can lock the color palette, preventing a
  2040. program from loading the PAL/DAC and border color registers by BIOS calls.
  2041. This feature is controlled by two SETCOLOR options:
  2042.  
  2043.   LOCKPAL      enable locked color palette, ignore BIOS calls defining colors
  2044.   UNLOCKPAL    disable locked color palette, allow programs to define colors
  2045.  
  2046. Palette locking should only be used when all other means of control fail.  It
  2047. is intended to be invoked as part of batch files that execute applications to
  2048. be controlled, locking the palette before the program runs, and unlocking it
  2049. after it completes.  The feature should never be enabled all of the time
  2050. because it will keep well behaved programs from making color changes too.
  2051.  
  2052. The SETCOLOR program also controls ANSIPLUS VGA monochrome monitor emulation.
  2053. Two keywords enable or disable this feature:
  2054.  
  2055.   MONOCHROME   begins VGA monochrome monitor emulation; and
  2056.   COLOR        ends VGA monochrome monitor emulation and restores colors.
  2057.  
  2058. And finally, SETCOLOR provides three reporting options:
  2059.  
  2060.   SHOW         displays the 16 current colors in a band across the screen
  2061.   HELP         gives a brief description of how to use the SETCOLOR program
  2062.   SCHEME HELP  lists the available color schemes in file SETCOLOR.sch
  2063.  
  2064.                                        32
  2065.  
  2066.                     CONTROLLING OTHER ANSIPLUS FEATURES
  2067.  
  2068. The SETAPLUS.exe utility program is used to enable and disable various ANSIPLUS
  2069. features while the system is running.  It can also be used to set the video
  2070. display mode, character height, video page and graphics mode text treatment
  2071. options, to define or list key reassignments, or to define the Ctrl+G beep
  2072. tone.  Changes made with SETAPLUS.exe are in effect only as long as your system
  2073. is running.  To change ANSIPLUS features for system bootup, use the NEWAPLUS
  2074. program.  SETAPLUS.exe is executed by a command of the form:
  2075.  
  2076.         SETAPLUS <keyword> [<keyword> ...]
  2077.  
  2078. where each <keyword> selects an ANSIPLUS feature or other option.  As for the
  2079. SETCOLOR.exe utility, if no <keyword> is supplied, you are presented with a
  2080. menu of choices.  These choices are shown in Table 4-4 below.
  2081.  
  2082.    +------------------------------------------------------------------------+
  2083.    |                             Table 4-4                                  |
  2084.    |                     SETAPLUS Main Menu Options                         |
  2085.    +-----------+------------------------------------------------------------+
  2086.    | Report    | Display current ANSIPLUS optional feature settings         |
  2087.    | Mode      | Set the video display mode                                 |
  2088.    | Height    | Set the displayed character height                         |
  2089.    | Tone      | Ctrl+G beep tone generation options                        |
  2090.    | Keyboard  | Caps Lock, Ctrl+C and key read-ahead options               |
  2091.    | Assign    | Key reassignment enable/disable option and key definition  |
  2092.    | Color     | Mode set color, blink, bright key echo and VGA mono options|
  2093.    | Display   | Screen saver and graphics mode cursor options              |
  2094.    | Scrollback| Scroll-back options                                        |
  2095.    | Other     | Scroll-Lock, smooth scrolling and copy/paste options       |
  2096.    | Undo      | Undo all feature changes since starting the main menu      |
  2097.    | Quit      | Quit and return to DOS                                     |
  2098.    +-----------+------------------------------------------------------------+
  2099.  
  2100. From the SETAPLUS command line, you control each ANSIPLUS feature with its own
  2101. selection keywords.  These selectors are shown in Table 4-5 on page 34.  When
  2102. used in combination with the following keywords, each controllable feature can
  2103. be enabled and disabled easily:
  2104.  
  2105.     ON, YES, or TRUE to enable the preceding feature,
  2106.     ENABLE to enable all following listed features,
  2107.     OFF, NO, or FALSE to disable the preceding feature,
  2108.     DISABLE to disable all following listed features, and
  2109.     RESET to set all features to their default values.
  2110.  
  2111. The following examples illustrate use of the SETAPLUS command line to control
  2112. ANSIPLUS features:
  2113.  
  2114.     SETAPLUS bright off              Disable bright key echo
  2115.     SETAPLUS enable capsunlock saver Enable screen saver and Caps reset on
  2116.                                      Shift+alpha
  2117.     SETAPLUS reset                   Reset all features to their default status
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.                                        33
  2124.  
  2125.  
  2126.  
  2127.         +-------------------------------------------------------------------+
  2128.         |                           Table 4-5                               |
  2129.         |              SETAPLUS Feature Selection Keywords                  |
  2130.         +------------+------------------------------------------------------+
  2131.         | SETCOLORS  | Install default (ANSIPLUS) colors on mode sets       |
  2132.         | DOSSET256  | Load default colors on DOS 256-color mode sets       |
  2133.         | WINSET256  | Load default colors on Windows 256-color mode sets   |
  2134.         | NOBLINK    | Enable 16-color text mode background (disable blink) |
  2135.         | BRIGHT     | Highlight echoed keys (bright key echo)              |
  2136.         | LOCKPAL    | Prevent palette/DAC color changes by programs        |
  2137.         | MONOCHROME | VGA monochrome monitor emulation                     |
  2138.         | RETRACE    | Wait for retrace before setting palette registers    |
  2139.         |            |                                                      |
  2140.         | SAVER      | Enable screen saver (blanker)                        |
  2141.         | EGASAVER   | Use alternative method for blanking VGA screen       |
  2142.         | READ60H    | Read key controller scan codes in screen saver       |
  2143.         | MSMOUSE    | Use MS mouse Int 33h polling in screen saver         |
  2144.         | PS2MOUSE   | Use PS/2 Int 74h mouse event interrupts in saver     |
  2145.         | PSEUDOCURS | Generate pseudo-cursor in VGA/EGA graphics modes     |
  2146.         | CURSOR256  | Generate pseudo-cursor in 256-color graphics modes   |
  2147.         | TTYTRAP    | Trap ANSI escape sequences in BIOS Write TTY         |
  2148.         |            |                                                      |
  2149.         | CAPSUNLOCK | Unlock Caps Lock with shift/letter key combination   |
  2150.         | CAPSRELOCK | Relock Caps with carriage return after shift/letter  |
  2151.         | CTRLC      | Generate Ctrl+Break when Ctrl+C is entered           |
  2152.         | NDLAST     | Read last key in buffer with non-destructive input   |
  2153.         | STACK      | Enable key stacking                                  |
  2154.         |            |                                                      |
  2155.         | KEYASSIGN  | Enable ANSI key reassignment                         |
  2156.         | BIOSASSIGN | Apply key reassignment at BIOS Int 16h level         |
  2157.         | NODEFKEY   | Prevent ANSI key reassignment redefinition           |
  2158.         |            |                                                      |
  2159.         | BEEP       | Use ANSIPLUS Ctrl+G beep tone generator              |
  2160.         | WINBEEP    | Allow ANSIPLUS beep tone under Windows               |
  2161.         |            |                                                      |
  2162.         | SCROLLBACK | Enable scroll-back of lines scrolled off top         |
  2163.         | DOSEMS     | Use expanded memory for DOS scroll-back              |
  2164.         | WINEMS     | Use expanded memory for Windows scroll-back          |
  2165.         | WINVRAM    | Allow video RAM for Windows scroll-back              |
  2166.         | XMSBACK    | Preserve scroll-back data using XMS or HMA memory    |
  2167.         | BIOSBACK   | Capture lines scrolled by BIOS call                  |
  2168.         | CLSBACK    | Capture erased pages never scrolled up               |
  2169.         | REGIONBACK | Capture lines scrolled from subscreen regions        |
  2170.         | PAGEPROTECT| Protect 2nd display page from scroll-back storage    |
  2171.         |            |                                                      |
  2172.         | LOCK       | Allow Scroll Lock key to freeze screen               |
  2173.         | ALTLOCK    | Require Alt+Scroll-Lock when freezing screen         |
  2174.         | SMOOTH     | Enable smooth scrolling                              |
  2175.         | WINSMOOTH  | Allow smooth scrolling under Windows                 |
  2176.         | SPEEDUP    | Speed up smooth scroll when delaying computer        |
  2177.         | BIOSCROLL  | Use BIOS calls for text mode screen scrolling        |
  2178.         | MOUSELOCK  | Require Scroll Lock for full screen mouse copy/paste |
  2179.         +------------+------------------------------------------------------+
  2180.  
  2181.  
  2182.                                        34
  2183.  
  2184. Other command line options include:
  2185.  
  2186.      MODE <decimal mode number> to set the video display mode,
  2187.      HEIGHT <height> to set the text character height,
  2188.      PAGE <page> to set the video page,
  2189.  
  2190.      KEYDEF to enter key reassignment definitions from the keyboard,
  2191.      LISTKEYS to list all current key reassignments,
  2192.      SAVEKEYS to save current key reassignments in a file,
  2193.      LOADKEYS <file name>  to load key reassignment definitions from a file,
  2194.  
  2195.      KEYSTACK <text> to add keys or delays to the keyboard buffer,
  2196.      RATE <char/sec> to set the keyboard "typematic" repeat rate,
  2197.      DELAY <quartersecs> to set the typematic key delay,
  2198.  
  2199.      SAVESCROLLTEXT <file name> to save scrollback to a file (text only),
  2200.      SAVESCROLLANSI <file name> to save scrollback with ANSI color control,
  2201.  
  2202.      SAVECLIP <file name> to save the clipboard to a file,
  2203.      LOADCLIP <file name> to load the clipboard from a file,
  2204.  
  2205.      BLANKTIME <minutes> to set the screen saver blanking time,
  2206.      TONE <frequency, duration list> to set the Ctrl+G beep tone,
  2207.  
  2208.      TEXT or TREATMENT to reset graphics mode text treatments,
  2209.      SHADOW, BOLD,  ITALICS, UNDERLINE or OUTLINE to enable text treatments,
  2210.  
  2211.      STATUS to report the current video mode, number of colors, etc.,
  2212.      FEATURES to report the settings of all ANSIPLUS features,
  2213.      REPORT to show both STATUS and FEATURES, and
  2214.      HELP to show all keyword options.
  2215.  
  2216. Two keyword options are provided for managing the interrupt vectors used by
  2217. ANSIPLUS:
  2218.  
  2219.       INTERRUPT      Displays, to the extent possible, the chain of programs
  2220.                      attached to each following selected interrupt
  2221.       LINK           Relinks ANSIPLUS to the selected interrupt(s)
  2222.  
  2223. You may specify interrupt selectors as either hexadecimal numbers or special
  2224. keywords:
  2225.  
  2226.       KEYEVENT       Interrupt 09h Key Event
  2227.       VIDEO          Interrupt 10h Video
  2228.       SYSTEMSERVICE  Interrupt 15h System Services
  2229.       KEYREQUEST     Interrupt 16h Keyboard Request
  2230.       KEYBREAK       Interrupt 1Bh Keyboard Break
  2231.       TIMERTICK      Interrupt 1Ch User Timer Tick
  2232.       DOSIDLE        Interrupt 28h DOS Idle
  2233.       DOSTTY         Interrupt 29h DOS Fast TTY Output
  2234.       MULTIPLEX      Interrupt 2Fh Multiplex
  2235.       MSMOUSE        Interrupt 33h Mouse
  2236.       PS2MOUSE       Interrupt 74h PS/2 Mouse Event
  2237.  
  2238. For example, SETAPLUS INTERRUPT 2F will list the programs attached to the DOS
  2239. Int 2Fh Multiplex interrupt.
  2240.  
  2241.                                        35
  2242.  
  2243.  
  2244. All the features controlled from the SETAPLUS command line are described in
  2245. Chapter 3 under "Changing the ANSIPLUS Startup Configuration", starting on page
  2246. 15, except for three:
  2247.  
  2248.  * To reassign keys, use the KEYDEF keyword.  You will be prompted for the key
  2249.    to reassign; after that, you type in the corresponding key reassignment, and
  2250.    terminate it with the End key.
  2251.  
  2252.  * To add keys to the keyboard buffer, use the keyword KEYSTACK, followed by
  2253.    any number of quoted strings, key scan and character codes (scan code times
  2254.    256 plus ASCII character code), or time delay directives (/Wnnn for timer
  2255.    ticks, or /Dnnn for milliseconds).  The following example enters "Dir",
  2256.    waits one second, then enters " *.*" and a carriage return:
  2257.  
  2258.      SETAPLUS KEYSTACK "Dir" /W18 " *.*" 13
  2259.  
  2260.  * To define the beep sound from the command line, use SETAPLUS and follow the
  2261.    keyword TONE with zero, one or more frequencies in Hertz and durations in
  2262.    milliseconds.  For example,
  2263.  
  2264.      SETAPLUS TONE            installs the default 880hz 385ms tone, and
  2265.      SETAPLUS TONE 1397,110,1047,165    defines a two-tone Ctrl+G beep.
  2266.  
  2267.    To define the beep sound from the SETAPLUS main menu, select Tone Definition
  2268.    and run through the feature options.
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.                                        36
  2301.  
  2302.                         CREATING APPLICATION BATCH FILES
  2303.  
  2304. Almost all DOS applications should run without change when ANSIPLUS is
  2305. installed.  However, in a few cases it may be desirable to create a batch file
  2306. that prepares the system for an application, runs it, and then cleans up
  2307. afterward.  There are four common reasons for creating these application batch
  2308. files:
  2309.  
  2310.  * To restore the normal DOS command shell video mode and colors after the
  2311.    program ends;
  2312.  
  2313.  * To install a color palette for the program to use when it runs;
  2314.  
  2315.  * To save key reassignments, change them, run a program, and restore the keys;
  2316.  
  2317.  * To enable or disable ANSIPLUS features that conflict with the program.
  2318.  
  2319. Many DOS application programs do not completely restore the video state on
  2320. completion.  The common problems seen (with examples in parentheses) are:
  2321.  
  2322.  * The program sets the color palette, usually to the OEM default, but doesn't
  2323.    restore it on completion (DOS 5.0 EDIT.com, DBASE III).
  2324.  
  2325.  * The program sets the border color, but doesn't restore it, or sets it to
  2326.    black on completion (DBASE III).
  2327.  
  2328.  * The program turns blink on, but doesn't restore it on completion (DOS 5.0
  2329.    EDIT.com, DBASE III).
  2330.  
  2331.  * The program selects a video mode, but doesn't restore the original one on
  2332.    completion (DOS 5.0 EDIT.com, DBASE III).
  2333.  
  2334.  * The program selects a video mode and restores it on completion, but doesn't
  2335.    restore the text height if it is not standard for the video mode (Quattro
  2336.    Pro 3.0 and others).
  2337.  
  2338. There are four simple options for restoring the ANSIPLUS video mode and colors
  2339. after running an application that sets its own mode, palette or border color:
  2340.  
  2341.  * The first option can be used to restore only the border color after an
  2342.    application has run.  Suppose the border color is normally palette code 17,
  2343.    then the following batch file will set the border after the application (in
  2344.    this example, DOS EDIT.com) runs:
  2345.  
  2346.         @ECHO OFF
  2347.         C:\DOS\EDIT.com %1 %2 %3 %4 %5 %6 %7 %8 %9
  2348.         SETCOLOR BORDER 17
  2349.  
  2350.  * The second option will restore the entire default ANSIPLUS palette and
  2351.    border color after the application runs:
  2352.  
  2353.         @ECHO OFF
  2354.         C:\DOS\EDIT.com %1 %2 %3 %4 %5 %6 %7 %8 %9
  2355.         SETCOLOR RESET
  2356.  
  2357.  
  2358.  
  2359.                                        37
  2360.  
  2361.  
  2362.  * The third option requires creating a small .com file that will load an
  2363.    entire color scheme.  This can be done at any time by hitting the letter "S"
  2364.    from the SETCOLOR.exe palette definition screen, or it can be done from the
  2365.    DOS command level with a command like:
  2366.  
  2367.         SETCOLOR SAVEPROGRAM MYCOLORS
  2368.  
  2369.    This will create a program called MYCOLORS.com, which loads the 16-color
  2370.    palette and border colors that were in effect when the program was created.
  2371.    The batch file for the application can then use this program to restore the
  2372.    color scheme on completion:
  2373.  
  2374.         @ECHO OFF
  2375.         C:\DOS\EDIT.com %1 %2 %3 %4 %5 %6 %7 %8 %9
  2376.         MYCOLORS
  2377.  
  2378.  * The fourth option saves and restores the video mode, character height and
  2379.    foreground/background color selection, and loads the ANSIPLUS default
  2380.    palette after the application completes.  The batch file uses the
  2381.    PUSHVID.com and POPVID.com programs provided with ANSIPLUS:
  2382.  
  2383.         @ECHO OFF
  2384.         PUSHVID
  2385.         C:\DOS\EDIT.com %1 %2 %3 %4 %5 %6 %7 %8 %9
  2386.         POPVID
  2387.  
  2388.    This is the best technique to use when running DOS in a text mode other than
  2389.    25 lines by 80 columns, because it will restore both the video display mode
  2390.    and text height.
  2391.  
  2392. The options for controlling colors used by applications depend on whether
  2393. custom colors are desired for the application and whether the application loads
  2394. its own palette:
  2395.  
  2396.  * If the application ordinarily uses ANSIPLUS's colors when it runs, then it
  2397.    will use any ANSIPLUS color palette in effect when it begins execution, so a
  2398.    .com color scheme file saved from the SETCOLOR.exe palette definition
  2399.    screen, or by a SETCOLOR SAVEPROGRAM APPCOLOR command, can be used to load a
  2400.    custom color scheme before running the application:
  2401.  
  2402.         @ECHO OFF
  2403.         APPCOLOR
  2404.         <application> %1 %2 %3 %4 %5 %6 %7 %8 %9
  2405.         MYCOLORS
  2406.  
  2407.    Because most DOS application programs select a video mode when they start
  2408.    up, be sure that the color scheme saved in APPCOLOR.com is saved as a
  2409.    default color scheme.
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.                                        38
  2419.  
  2420.  * To use the ANSIPLUS palette for an application that installs its own
  2421.    palette, the palette must be locked before the program starts and unlocked
  2422.    after it completes:
  2423.  
  2424.         @ECHO OFF
  2425.         LOCKPAL
  2426.         <application> %1 %2 %3 %4 %5 %6 %7 %8 %9
  2427.         UNLOKPAL
  2428.  
  2429.    Warning: Palette locking should only be used when all other means of control
  2430.    fail.  The feature should never be left enabled all of the time because it
  2431.    will keep well behaved programs from making any color changes.
  2432.  
  2433.  * To use custom colors for an application that wants to install its own
  2434.    palette, the custom colors are loaded before the palette is locked:
  2435.  
  2436.         @ECHO OFF
  2437.         APPCOLOR
  2438.         LOCKPAL
  2439.         <application> %1 %2 %3 %4 %5 %6 %7 %8 %9
  2440.         UNLOKPAL
  2441.         MYCOLORS
  2442.  
  2443. If you run your system using a certain set of ANSI key reassignments most of
  2444. the time, but also run an application that sets up its own key reassignments,
  2445. the PUSHKEYS.com and POPKEYS.com programs supplied with ANSIPLUS can be used in
  2446. a batch file to save the keys before the application is started and to restore
  2447. them after it completes:
  2448.  
  2449.         @ECHO OFF
  2450.         PUSHKEYS
  2451.         <application> %1 %2 %3 %4 %5 %6 %7 %8 %9
  2452.         POPKEYS
  2453.  
  2454. If you want to set up a special set of key reassignments before running an
  2455. application, just define the reassignments using the SETAPLUS utility program,
  2456. and then save them to a file (in this example, named APPKEYS.com) with a
  2457. SETAPLUS SAVEKEYS APPKEYS.com command.  You then run APPKEYS.com in your batch
  2458. file after savng the keys, but before the application:
  2459.  
  2460.         @ECHO OFF
  2461.         PUSHKEYS
  2462.         APPKEYS
  2463.         <application> %1 %2 %3 %4 %5 %6 %7 %8 %9
  2464.         POPKEYS
  2465.  
  2466. In the event of a conflict between an ANSIPLUS feature and an application, the
  2467. feature can be disabled before running the application and enabled again after
  2468. it completes.  For example, the following batch file turns off the screen saver
  2469. while running an application:
  2470.  
  2471.         @ECHO OFF
  2472.         SETAPLUS DISABLE SAVER
  2473.         <application> %1 %2 %3 %4 %5 %6 %7 %8 %9
  2474.         SETAPLUS ENABLE SAVER
  2475.  
  2476.  
  2477.                                        39
  2478.  
  2479.                      EDITING ANSI ESCAPE SEQUENCE PROGRAMS
  2480.  
  2481. After using ANSIPLUS for a while, the user will find it desirable to create
  2482. short programs for frequently used video modes, color selections or
  2483. definitions, key reassignments, etc.  The ANSICOM.exe utility program provides
  2484. this facility: with it, the user can create and edit small executable ".com"
  2485. files or small printable text files that contain ANSI escape sequences.
  2486. ANSICOM is executed with the following command:
  2487.  
  2488.      ANSICOM <filename>
  2489.  
  2490. where <filename> is the name of the file to be edited.  Your file to edit is
  2491. selected using the following rules:
  2492.  
  2493.  * If no file name is supplied, you will be presented with a menu of ".com"
  2494.    files to select from.
  2495.  
  2496.  * If a file name is supplied, and it does not include a file type, a file type
  2497.    of ".com" is assumed.
  2498.  
  2499.  * When an existing ".com" file is edited, it is first checked for program code
  2500.    that outputs the ANSI escape sequences.  If this is not found, ANSICOM will
  2501.    refuse to edit the file.
  2502.  
  2503.  * If the file to be edited is not a ".com" file, then it is assumed to be a
  2504.    non-executable printable text file.
  2505.  
  2506.  * If the named file is not found (including a search of the system PATH),
  2507.    ANSICOM will ask if a new file is to be created.
  2508.  
  2509. Once the file has been properly identified, a full-screen editing display is
  2510. presented, and you can go to work.  Use the F1 key for context sensitive help.
  2511.  
  2512. The ANSICOM full screen editing display automatically parses the user's entries
  2513. and identifies the kinds of ANSIPLUS escape sequences entered, including
  2514. incomplete escape sequences.  ANSICOM will not allow the user to save a file
  2515. containing an incomplete escape sequence.  Beyond that, it is the user's
  2516. responsibility to be sure that the escape sequences entered will do what he
  2517. wants.
  2518.  
  2519.  
  2520.  
  2521.  
  2522.  
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.                                        40
  2537. V.   ANSIPLUS ESCAPE SEQUENCES
  2538.  
  2539. This chapter lists and briefly describes each of the "ANSI" Escape sequences
  2540. recognized by ANSIPLUS.  They are described in detail only in the printed
  2541. ANSIPLUS User's Guide.  In the table, "#" represents any numeric parameter and
  2542. "Esc" is the Escape character (decimal 27, hexadecimal 1Bh):
  2543.  
  2544.  
  2545.      Control Sequence    Description
  2546.      ----------------    -----------
  2547.  
  2548.                    DISPLAY MODE AND CHARACTER SET
  2549.  
  2550.      Esc [#;#h           Set video display mode
  2551.      Esc [#;#l           Reset video display mode
  2552.  
  2553.      Esc [!#t            Select character set height: 8, 14 or 16 scan lines
  2554.      Esc [!#;...;#e      Select graphics mode text treatment options
  2555.  
  2556.      Esc [!#v            Select video page
  2557.      Esc [#U             Select next page
  2558.      Esc [#V             Select preceding page
  2559.  
  2560.  
  2561.                          CURSOR POSITIONING
  2562.  
  2563.      Esc [#;#H           Set cursor position
  2564.      Esc [#;#f           Set cursor position
  2565.  
  2566.      Esc [#A             Move cursor up
  2567.      Esc [#B             Move cursor down
  2568.      Esc [#C             Move cursor right
  2569.      Esc [#D             Move cursor left
  2570.  
  2571.      Esc [#E             Move cursor to next line
  2572.      Esc [#F             Move cursor to preceding line
  2573.  
  2574.      Esc [#G             Move cursor to absolute column in same line
  2575.      Esc [#a             Move cursor to absolute line in same column
  2576.  
  2577.      Esc [#;#;#g         Reset tabs
  2578.      Esc [#;...;#W       Tab control
  2579.  
  2580.      Esc [#I             Horizontal tab
  2581.      Esc [#Y             Vertical tab
  2582.      Esc [#Z             Backward tab
  2583.  
  2584.      Esc [#;#s           Save cursor position or other driver context
  2585.      Esc [#;#u           Restore cursor position or other driver context
  2586.  
  2587.  
  2588.                    COLOR SELECTION AND DEFINITION
  2589.  
  2590.      Esc [#;...;#m       Select current color attributes for output characters
  2591.  
  2592.      Esc [!#;#;#;#;#c    Define colors available, select palette, set up color
  2593.                          blinking, restore color definitions or palette
  2594.  
  2595.                                        41
  2596.  
  2597.      Control Sequence    Description
  2598.      ----------------    -----------
  2599.  
  2600.  
  2601.                       ERASE, INSERT AND DELETE
  2602.  
  2603.      Esc [#;#J           Clear the screen
  2604.      Esc [#;#;#K         Clear the current line
  2605.      Esc [#;#X           Erase characters on the current line
  2606.  
  2607.      Esc [#;#L           Insert lines on the screen
  2608.      Esc [!#;#L          Insert lines from scroll-back
  2609.      Esc [#;#M           Delete lines from the screen
  2610.      ESc [!#;#M          Delete lines and add to scroll-back
  2611.  
  2612.      Esc [#;#@           Insert characters on a line or a column range
  2613.      Esc [#;#P           Delete characters from a line or a column range
  2614.  
  2615.      Esc [#b             Repeat last output character
  2616.  
  2617.      Esc [#;#;#;#;#S     Scroll up
  2618.      Esc [!#;#;#;#;#S    Scroll up and add to scroll-back
  2619.      Esc [#;#;#;#;#T     Scroll down
  2620.      Esc [!#;#;#;#;#T    Scroll down from scroll-back
  2621.  
  2622.      Esc [#;#;#;#;# @    Scroll left (Note: a Space must precede "@")
  2623.      Esc [#;#;#;#;# A    Scroll right (Note: a Space must precede "A")
  2624.  
  2625.      Esc [#;#;#;#r       Set scrolling region
  2626.  
  2627.  
  2628.                      DRIVER STATUS AND CONTROL
  2629.  
  2630.      Esc [#;#n           Query ANSIPLUS status: cursor position, current color
  2631.                          selection, video mode and number of colors, screen and
  2632.                          character dimensions, color definitions, feature
  2633.                          settings, tone definition, key reassignment, etc.
  2634.  
  2635.      Esc [!#;...;#d      Enable or disable ANSIPLUS driver feature settings
  2636.  
  2637.      Esc [!#;...;#g      Define the Ctrl+G beep tone
  2638.  
  2639.      Esc [#;...;#p       Define key reassignment (accepts quoted strings)
  2640.  
  2641.      Esc [!#;...;#k      Add keys to keyboard buffer (accepts quoted strings)
  2642.  
  2643.      Esc [!#w            Wait for specified time to elapse
  2644.  
  2645.  
  2646. Besides supporting all the escape sequences accepted by the MS-DOS ANSI.sys
  2647. driver, ANSIPLUS accepts additional parameters for many, and includes several
  2648. entirely new control functions. See "ANSIPLUS Extensions and the ANSI Standard"
  2649. on page 48 for differences between ANSIPLUS and the ANSI.sys driver.
  2650.  
  2651.  
  2652.  
  2653.  
  2654.                                        42
  2655.  
  2656. VI.  TECHNICAL NOTES
  2657.  
  2658.  
  2659.                              ANSIPLUS AND WINDOWS 3
  2660.  
  2661. Users of Windows 3.0 and 3.1 should consider using ANSIPLUS as well.  The
  2662. ANSIPLUS driver works well with DOS programs under Windows 3, and there are
  2663. advantages to using it in Windows 386 Enhanced Mode.  Because ANSIPLUS is a CON
  2664. driver, local copies of it are included in each Windows 386 Enhanced Mode
  2665. virtual 8086.  This means that all the ANSIPLUS internal state variables, and
  2666. those of its integrated console features, will be local to each virtual 8086,
  2667. so there is no way they can interfere with each other.  This section discusses
  2668. how to work around the limitations imposed on ANSIPLUS DOS sessions by Windows
  2669. or by Windows in combination with other software.
  2670.  
  2671.  
  2672. Loading Options
  2673.  
  2674. With DOS 5.0 or later, or with an XMS memory manager such as QEMM (using
  2675. LOADHI) or 386MAX, ANSIPLUS can be loaded into upper memory blocks above 640K
  2676. to provide a larger program area below 640K.  All ANSIPLUS memory loading
  2677. options are compatible with Windows, with the following exceptions:
  2678.  
  2679.  * When the ANSIPLUS shared code has been loaded into expanded memory, Version
  2680.    6 of 386MAX (and possibly other versions) will refuse to let Windows start
  2681.    in 386 Enhanced mode.  The 386MAX memory manager complains that expanded
  2682.    memory cache software is running.  This limitation does not exist for the
  2683.    EMM386 or QEMM386 memory managers.  To get Windows to run with ANSIPLUS and
  2684.    386MAX, load the ANSIPLUS driver into XMS upper memory, HMA, or low memory
  2685.    instead.
  2686.  
  2687.  * If Windows 3.0 (not 3.1!) will be run in 386 Enhanced mode, it is strongly
  2688.    recommended that the entire ANSIPLUS driver (or any other ANSI driver) not
  2689.    be loaded into high memory by DEVICEHIGH or equivalent, and that ANSIPLUS
  2690.    load itself high instead.  This is because Windows 3.0 does not localize the
  2691.    XMS upper memory block area above 640K for its virtual 8086's, and so only
  2692.    one global copy of ANSIPLUS would be shared among all virtual machines.
  2693.    This can cause trouble: if, for example, a program in one window selects
  2694.    colors, then those colors would also be in force for all DOS programs in
  2695.    other windows!
  2696.  
  2697.  
  2698.  
  2699. Beep Tone
  2700.  
  2701. When Windows is running in 386 Enhanced mode, and a DOS program running in the
  2702. background outputs a Ctrl+G, the background program's virtual 8086 may not be
  2703. running fast enough to accurately time the tone.  Because of this, the tone can
  2704. drag out and sound strange.  Disabling ANSIPLUS tone generation under Windows
  2705. restores the original Windows sound driver, but makes the tone frequency and
  2706. duration non-changeable.
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.                                        43
  2714.  
  2715.  
  2716. Scroll-Back
  2717.  
  2718. The recommended storage location for scroll-back data under Windows is expanded
  2719. memory (EMS).  Use of EMS for scroll-back instead of video RAM (as was done by
  2720. ANSIPLUS drivers before Release 3.10) eliminates compatibility problems with
  2721. Windows video drivers apparently caused by memory accesses to video RAM not on
  2722. the visible part of the virtual screen.
  2723.  
  2724. The standard Windows 3.1 DOSPRMPT.pif and _DEFAULT.pif files both allow
  2725. programs to access EMS memory.  A sample PIF file with suggested PIF settings
  2726. (for the MS-DOS prompt) is included with the ANSIPLUS package in the file
  2727. APLUS.pif.  These settings are recommended, but not necessary, for all DOS
  2728. applications that depend on scroll-back under Windows.
  2729.  
  2730. Under Windows, when a 386 Enhanced Mode DOS session starts, ANSIPLUS will try
  2731. to allocate 64K of private expanded memory (EMS) for scroll-back (48K if
  2732. ANSIPLUS shared code was loaded into EMS).  If the EMS is not available (for
  2733. example, if the Windows PIF file for the application does not provide expanded
  2734. memory), then the driver will attempt to use video RAM for scroll-back instead,
  2735. if that option has been specifically enabled.  ANSIPLUS provides a configurable
  2736. feature that can prevent Windows EMS from being allocated for scroll-back and
  2737. force any Windows DOS session scroll-back to reside in video RAM.  This is not
  2738. advised, however, because scroll-back in video RAM under Windows is not
  2739. reliable when used with many Windows video drivers.
  2740.  
  2741. Using video RAM for scroll-back under Windows has problems, particularly for
  2742. DOS applications run in a window.  One difficulty is that when a DOS
  2743. application is run in 386 Enhanced Mode, Windows will not maintain a full 32K
  2744. of text mode RAM unless the Windows PIF file specifies "High Graphics" and
  2745. "Retain Video Memory".  If these PIF settings are not used, then the first time
  2746. that ANSIPLUS needs to access the scroll-back storage area, Windows may present
  2747. a message claiming that there is not enough memory for the application to
  2748. correctly display information.  If this happens, just click on OK, then hit
  2749. Alt+Enter to switch to a full screen display and proceed.  Scroll-back data
  2750. will also likely be lost when the focus is switched from task to task, as with
  2751. the Alt+Tab key, or when changing display modes.  Even with these PIF settings,
  2752. some Windows 3.1 video drivers (eg., 256-color ET-4000) will not work correctly
  2753. when video RAM outside the visible screen is accessed, resulting in loss of
  2754. scroll-back text or incomplete updating of the screen.  You therefore should
  2755. exercise caution before relying on video RAM for scroll-back under Windows.
  2756.  
  2757. Starting with ANSIPLUS Release 3.1, scroll-back lines are captured under
  2758. Windows as they are completed, rather than as they scroll off the top of the
  2759. screen.  This change was necessary because some Windows video drivers (eg.,
  2760. Microsoft VGA) trap BIOS scrolling requests completely and do not pass them
  2761. through to the DOS virtual 8086 when running a DOS session in a window.  This
  2762. makes it impossible for ANSIPLUS to know when the screen has scrolled if a BIOS
  2763. call was used to do it.  Some important DOS programs now mix DOS output and
  2764. BIOS calls for scrolling (eg., 4DOS 5.0 and NDOS 8.0 when displaying
  2765. multi-colored directories).
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.                                        44
  2773. Smooth Scrolling
  2774.  
  2775. Smooth scrolling should operate correctly for full screen DOS programs under
  2776. Windows.  However, when a DOS session is run in a window, the direct access to
  2777. video controller I/O ports required for smooth scrolling may interfere with
  2778. some Windows video display drivers.  For example, the 256-color drivers for the
  2779. Tseng ET4000 may leave undrawn black areas on the screen when scrolling occurs
  2780. in a window while smooth scrolling is active.  Because of this, smooth
  2781. scrolling must be prevented when a DOS session is in a window, and allowed only
  2782. when it is full screen.
  2783.  
  2784. The VWFD.386 Windows Virtual Device Driver, which is supplied with ANSIPLUS, is
  2785. required to test whether a DOS virtual machine is full screen or in a window.
  2786. If VWFD.386 is not installed, ANSIPLUS will have no way of knowing whether it
  2787. is running full screen under Windows, and so will disable smooth scrolling
  2788. completely when Windows is running.  VFWD.386 is also called by the ANSIPLUS
  2789. screen saver to test for full screen operation before blanking the screen, and
  2790. by the ANSIPLUS copy/paste routines before waking up the mouse if Scroll Lock
  2791. is off.  If the VWFD.386 driver is not installed, ANSIPLUS must assume that the
  2792. DOS session is in a window and disable screen blanking and mouse usage too.
  2793.  
  2794. To install the VWFD.386 VxD, copy the VWFD.386 file to the WINDOWS\SYSTEM
  2795. directory, and add the following line to the [386Enh] section of the Windows
  2796. SYSTEM.ini file:
  2797.  
  2798.        DEVICE=VWFD.386
  2799.  
  2800.  
  2801. Color Palettes
  2802.  
  2803. Full screen DOS programs in Windows will use the same colors that they do when
  2804. run under DOS.  When the same program is run in a window, its 16-color palette
  2805. will be determined entirely by Windows and the Windows video driver.  ANSIPLUS
  2806. will have no control over the palette when running in a window.
  2807.  
  2808. Under Windows, with ANSIPLUS versions prior to 3.10, when a DOS session was run
  2809. in a window using Microsoft's 16-color VGA video driver, only 13 distinct
  2810. colors were available on the ANSIPLUS 16 color palette (i.e., 3 colors were
  2811. duplicated: brown was the same as dark red, light blue was the same as light
  2812. cyan, and pink was white.) Other video drivers do not seem to have this problem
  2813. because they do not try to adapt to color palette settings made by programs
  2814. running in a window.
  2815.  
  2816. Starting with ANSIPLUS Release 3.10, the standard ANSIPLUS palette has been
  2817. adjusted slightly to allow brown to show as dark yellow and light blue as light
  2818. blue under the Microsoft VGA driver.  Users of the Microsoft VGA driver can
  2819. convert pink to light magenta by running the WINVGA16.com program provided with
  2820. ANSIPLUS.  Including WINVGA16.com in AUTOEXEC.bat will change pink to light
  2821. magenta for all DOS applications in and out of Windows.  Running it within a
  2822. Windows DOS session will change the color for only that DOS session.
  2823. WINVGA16.com will not work if run in WINSTART.bat because it is not a TSR.
  2824.  
  2825. Some 256-color drivers for Windows apparently assume that the OEM 256-color
  2826. palette has been loaded when the 256-color mode was selected, and never define
  2827. the colors that Windows will use.  Because of this, ANSIPLUS normally does not
  2828. load its default colors when a 256-color mode is selected under Windows.  This
  2829. can be overridden by a configurable feature.
  2830.  
  2831.                                        45
  2832. International Usage
  2833.  
  2834. When the DISPLAY.sys driver is used with Windows 3.0 or 3.1, the colors and
  2835. other variables of either ANSIPLUS or the DOS ANSI.sys driver are not localized
  2836. to each virtual 8086.  This appears to be because DISPLAY.sys is a CON device
  2837. driver that calls the previous CON driver (i.e., ANSIPLUS) to control the
  2838. console, so DOS actually has two CON drivers active at the same time.  Windows
  2839. only localizes the first CON driver it finds on the DOS device chain, and this
  2840. will be the most recent CON device installed, which is DISPLAY.sys, not
  2841. ANSIPLUS.  Two system setup changes are required to circumvent the problem:
  2842.  
  2843.  (1) Enter the following command to change the name of the ANSIPLUS driver in
  2844.      memory from "CON" to "CONAPLUS":
  2845.  
  2846.          SETAPLUS LOCALCON
  2847.  
  2848.      This command is automatically inserted into AUTOEXEC.bat by the ANSIPLUS
  2849.      INSTALL program when DISPLAY.sys is detected.
  2850.  
  2851.  (2) Add the following command to the [386Enh] section of the Windows
  2852.      SYSTEM.ini file (put it right after the "LOCAL=CON" line):
  2853.  
  2854.          LOCAL=CONAPLUS
  2855.  
  2856.      This causes Windows to localize the ANSIPLUS driver to each virtual 8086.
  2857.      The SYSTEM.ini file is not altered by the ANSIPLUS INSTALL program.
  2858.  
  2859. If the DISPLAY.sys driver is in use and ANSIPLUS shared code has been loaded
  2860. into expanded memory, the SETAPLUS LOCALCON command must be executed before
  2861. Windows is started, and the LOCAL=CONAPLUS line MUST be added to SYSTEM.ini!
  2862. If it is not, Windows will probably crash the first time a DOS program or
  2863. session is started.
  2864.  
  2865. These system setup changes are totally unnecessary if the DISPLAY.sys driver is
  2866. not being used.
  2867.  
  2868.                  ANSIPLUS AND THE 4DOS OR NDOS COMMAND SHELLS
  2869.  
  2870. The ANSIPLUS driver is compatible with the 4DOS and NDOS command shells.  Two
  2871. ANSIPLUS features are specifically adapted to 4DOS/NDOS:
  2872.  
  2873.  * ANSIPLUS supports key stacking (for 4DOS 4.0+ and NDOS Version 7.0+), so the
  2874.    KSTACK.com TSR does not need to be loaded.  When ANSIPLUS key stacking is
  2875.    enabled, ANSIPLUS emulates the 4DOS/NDOS Int 2Fh function D44Fh key stacking
  2876.    interface, so the 4DOS/NDOS KEYSTACK command will work, and loading the
  2877.    KSTACK.com driver will report that it is already installed.
  2878.  
  2879.    ANSIPLUS key stacking capacity is limited to the size of ANSIPLUS's key
  2880.    buffer, which is configurable by INSTALL/NEWAPLUS up to 512 keys.  ANSIPLUS
  2881.    key stacking can be disabled if KSTACK.com or KEYSTACK.sys is preferred.
  2882.  
  2883.  * The SETCOLOR.exe utility program can be used as a replacement for the 4DOS
  2884.    or NDOS internal COLOR command, since SETCOLOR supports the syntax and all
  2885.    options of COLOR, plus many additional options.  To do this, two commands
  2886.    should be added to AUTOEXEC.bat:
  2887.  
  2888.         SETDOS /i-COLOR
  2889.         ALIAS COLOR SETCOLOR
  2890.                                        46
  2891.  
  2892.                   ANSIPLUS AND MULTITASKERS OR TASK SWITCHERS
  2893.  
  2894.  
  2895. OS/2
  2896.  
  2897. The ANSIPLUS INSTALL program can recognize and alter the OS/2 CONFIG.sys file
  2898. just as it can for MS-DOS.  Once ANSIPLUS is installed, it will be available to
  2899. all OS/2 full screen and windowed DOS sessions.  ANSIPLUS features will not be
  2900. available to OS/2 sessions because ANSIPLUS is currently a DOS, not an OS/2
  2901. device driver.  Only three other minor issues affect ANSIPLUS under OS/2:
  2902.  
  2903.  * The $i PROMPT, which is part of the default prompt inserted by OS/2 install,
  2904.    interferes with ANSIPLUS scroll-back because at every DOS command shell
  2905.    prompt the top line on the screen is replaced by an OS/2 help message.  When
  2906.    the screen scrolls, this message is then added to scroll-back instead of the
  2907.    original content of the top line.  It is best to remove the $i from your
  2908.    DOS prompt.
  2909.  
  2910.  * You must disable VIDEO_RETRACE_EMULATION if you want to use smooth scrolling
  2911.    in full screen DOS sessions.  Otherwise, OS/2 will ignore ANSIPLUS's smooth
  2912.    scrolling control.  Rough scrolling always applies in DOS windows.
  2913.  
  2914.  * Because virtual DOS machines are created and initialized so often by OS/2,
  2915.    the ANSIPLUS signon message is suppressed when ANSIPLUS is loaded as a
  2916.    device driver by CONFIG.sys.  When ANSIPLUS.exe is loaded as a TSR, the
  2917.    signon message will always be displayed.  The unregistered Shareware driver
  2918.    will display the ANSIPLUS signon (with the 9 second delay) about one percent
  2919.    of the time when it initializes in a new virtual DOS machine.
  2920.  
  2921.  
  2922. DESQview
  2923.  
  2924. Because of DESQview's handling of device drivers loaded before it starts, and
  2925. because it takes over an interrupt vector used by ANSI drivers, DESQview
  2926. presents a challenge for an attached console driver like ANSIPLUS:
  2927.  
  2928.  * If a device driver, such as ANSIPLUS, is loaded before DESQview is started,
  2929.    a single copy of the driver will be shared by all DESQview windows (virtual
  2930.    8086's), because DESQview does not create local copies for each window.
  2931.    This means, for example, that changing colors by ANSI escape sequence in one
  2932.    window would affect the colors used in other windows.
  2933.  
  2934.  * As each DESQview window is created, the Int 29h fast console output
  2935.    interrupt, which ANSIPLUS and other ANSI drivers depend on to receive much
  2936.    of their character output, is taken over by DESQview.  This means that DOS
  2937.    output, including ANSI escape sequences, will never be processed by the
  2938.    driver, because DESQview will get it first.
  2939.  
  2940. Because of these problems, any console driver that will be used in a DESQview
  2941. window must be loaded as a TSR after the window has started.  The best method
  2942. is to create a batch file that loads ANSIPLUS and does anything else needed to
  2943. set up the window, and then executes the command associated with the window.
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.                                        47
  2950.  
  2951.  
  2952. And there are a few more complications:
  2953.  
  2954.  * It is desirable to use ANSIPLUS both inside and outside of DESQview.  This
  2955.    means that if an ANSIPLUS driver is already loaded when DESQview is started,
  2956.    it should detect this event so that the driver can disable itself.  When
  2957.    DESQview terminates, the disabled driver must then reactivate itself.
  2958.  
  2959.  * To save memory, any TSR copies of ANSIPLUS loaded in a window should be able
  2960.    to execute using the shared code from the ANSIPLUS driver loaded before
  2961.    DESQview, so that the TSR copy in each window will require only about 6K.
  2962.  
  2963.  * Expanded memory, which is used by ANSIPLUS to hold its scroll-back data and
  2964.    sometimes its shared code, is managed globally under DESQview, so the
  2965.    ANSIPLUS driver must allocate separate EMM handles for scroll-back and
  2966.    assign them different names in each DESQview window.
  2967.  
  2968. The registered ANSIPLUS.exe device driver satisfies all these requirements.
  2969. The Shareware ANSIPLUS.sys driver, however, cannot be loaded as a TSR except by
  2970. another program, such as Quarterdeck's DEVICE.com.  And because loading the
  2971. CON device driver ANSIPLUS.sys will change the system console, DEVICE.com does
  2972. not appear to completely install the driver, at least as far as the MS-DOS
  2973. command shell, COMMAND.com, is concerned.  This must be corrected by entering a
  2974. CTTY CON command in each window after ANSIPLUS.sys has been loaded.
  2975.  
  2976. The ANSIPLUS driver is DESQview aware: After it is loaded in a DESQview window,
  2977. it uses alternative video buffers for video output if the screen is not
  2978. "virtualized", calls the BIOS for cursor positioning instead of writing
  2979. directly to the video controller, releases time slices when waiting for key
  2980. input, disables the ANSIPLUS screen saver, and prevents video RAM from being
  2981. used to store scroll-back (EMS scroll-back is still allowed).
  2982.  
  2983.  
  2984. Task Switchers
  2985.  
  2986. When a task switcher, such as MS-DOS DOSSHELL, is running, the user should have
  2987. independent ANSIPLUS consoles for each task.  To provide this functionality,
  2988. ANSIPLUS supports the Microsoft Int 2Fh functions 4B01h-4B05h task switcher
  2989. interface, which is used by both DOSSHELL and Windows 3.1 Standard Mode.  Via
  2990. the interface, ANSIPLUS reports its instance data to the task switcher and
  2991. monitors switcher activity to control allocation and destruction of EMS handles
  2992. for session scroll-back, if the task switcher allows this.  ANSIPLUS should
  2993. also work with other task switchers that support this interface.
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.                                        48
  3009.                    ANSIPLUS EXTENSIONS AND THE ANSI STANDARD
  3010.  
  3011. ANSIPLUS uses a number of added control parameters and includes entire new
  3012. control functions that are not part of the ANSI X3.64 standard or the MS-DOS
  3013. ANSI.sys driver, so do not expect them to be supported by any other drivers or
  3014. devices.  The following added ANSIPLUS functions are not standard ANSI:
  3015.  
  3016.     Esc [!#t            Select character set height
  3017.     Esc [!#;...;#e      Select graphics mode text treatment options
  3018.     Esc [!#v            Select video page
  3019.     Esc [!#;#;#;#;#c    Define colors available, select palette, setup blinking
  3020.     Esc [!#;#L          Insert lines from scroll-back
  3021.     Esc [!#;#M          Delete lines and add to scroll-back
  3022.     Esc [!#;#;#;#;#S    Scroll up and add to scroll-back
  3023.     Esc [!#;#;#;#;#T    Scroll down from scroll-back
  3024.     Esc [!#;...;#d      Enable or disable ANSIPLUS driver features
  3025.     Esc [!#;...;#g      Define Ctrl+G beep tone
  3026.     Esc [!#;...;#k      Add keys to keyboard buffer
  3027.     Esc [!#w            Wait for specified time to elapse
  3028.  
  3029. The following ANSI control sequences accept both standard ANSI parameters and
  3030. extra ANSIPLUS parameters, but are not included in MS-DOS ANSI.sys:
  3031.  
  3032.     Esc [#;#g           Reset tabs
  3033.     Esc [#;...;#W       Tab control
  3034.     Esc [#;#X           Erase characters on the current line
  3035.     Esc [#;#L           Insert lines on the screen
  3036.     Esc [#;#M           Delete lines from the screen
  3037.     Esc [#;#@           Insert characters on a line
  3038.     Esc [#;#P           Delete characters from a line
  3039.     Esc [#;#;#;#;#S     Scroll up
  3040.     Esc [#;#;#;#;#T     Scroll down
  3041.     Esc [#;#;#;#;# @    Scroll left
  3042.     Esc [#;#;#;#;# A    Scroll right
  3043.     Esc [#;#;#;#r       Set scrolling region
  3044.  
  3045. The following are standard ANSI terminal control sequences that are not
  3046. included in MS-DOS ANSI.sys:
  3047.  
  3048.     Esc [#U             Select next page
  3049.     Esc [#V             Select preceding page
  3050.     Esc [#E             Move cursor to next line
  3051.     Esc [#F             Move cursor to preceding line
  3052.     Esc [#G             Move cursor to absolute column in same line
  3053.     Esc [#a             Move cursor to absolute line in same column
  3054.     Esc [#I             Horizontal tab
  3055.     Esc [#Y             Vertical tab
  3056.     Esc [#Z             Backward tab
  3057.     Esc [#b             Repeat last output character
  3058.  
  3059. The following control sequences, which are also included in ANSI.sys, accept
  3060. both standard ANSI parameters and extra ANSIPLUS parameters:
  3061.  
  3062.     Esc [#;#h           Set video mode
  3063.     Esc [#;#s           Save cursor position or other driver context
  3064.     Esc [#;#u           Restore cursor position or other driver context
  3065.     Esc [#;#J           Clear the screen
  3066.  
  3067.                                        49
  3068.  
  3069.     Esc [#;#;#K         Clear the current line
  3070.     Esc [#;...;#m       Select current color attributes for output characters
  3071.     Esc [#;#n           Query ANSIPLUS status: cursor position, colors, etc.
  3072.     Esc [#;...;#p       Define key reassignment
  3073.  
  3074. The following are ANSI sequences that are in both MS-DOS ANSI.sys and ANSIPLUS:
  3075.  
  3076.     Esc [#A             Move cursor up
  3077.     Esc [#B             Move cursor down
  3078.     Esc [#C             Move cursor right
  3079.     Esc [#D             Move cursor left
  3080.  
  3081.  
  3082.                     ESCAPE SEQUENCE RECOGNIZER ENHANCEMENTS
  3083.  
  3084. To simplify program generation of control sequences, the ANSIPLUS escape
  3085. sequence recognizer syntax has been relaxed:
  3086.  
  3087.  * Blanks between parameters in escape sequences are ignored.  Note, however,
  3088.    that a blank space immediately before the ANSI command letter may be
  3089.    significant.  For example, Esc [A moves the cursor up, while Esc [ A scrolls
  3090.    the screen left;
  3091.  
  3092.  * Commas are allowed as separators in addition to semicolons;
  3093.  
  3094.  * Either single or double quotes may be used around character parameters;
  3095.  
  3096.  * Parameter values over 255 (i.e., up to 65,535) are accepted for certain
  3097.    commands. Plus and minus signs are also accepted.
  3098.  
  3099. Unrecognized escape sequences are passed through by the driver unaltered.  With
  3100. a few exceptions, the Esc character is trapped only when followed by a left
  3101. bracket ("["), so programs that write the escape character (a left arrow) to
  3102. the screen will continue to do so after the driver is installed.  The
  3103. exceptions are Esc E, Esc H and Esc J, which are all ANSI standard.
  3104.  
  3105.  
  3106.                    DIRECT ACCESS TO VIDEO RAM VS. BIOS CALLS
  3107.  
  3108. ANSIPLUS uses direct access to video RAM in all VGA/EGA text and most common
  3109. graphics modes.  However, BIOS calls will be used to output characters in four
  3110. cases:
  3111.  
  3112.  * Graphics modes with 256 or more colors;
  3113.  
  3114.  * Graphics modes that require more than 64K bytes of video RAM (i.e., 16 color
  3115.    graphics modes exceeding 800x600 resolution).
  3116.  
  3117.  * Unrecognized (usually CGA or Hercules) display modes.
  3118.  
  3119.  * All graphics modes under the reduced capability ANSIPLSR.sys driver.
  3120.  
  3121. When BIOS calls are used, output is much slower, and "transparent" mode output,
  3122. graphics mode text treatments, insert/delete characters and scroll left/right
  3123. are also not supported.  Future versions of ANSIPLUS may extend direct video
  3124. RAM access to some of these modes.
  3125.  
  3126.                                        50
  3127.  
  3128.                   INSTALLATION CHECK AND INTERRUPT 2FH API
  3129.  
  3130. ANSIPLUS responds to the Interrupt 2Fh test for ANSI.sys installation.  When
  3131. Int 2Fh is called with AX=1A00h, ANSIPLUS will return AL=0FFh to indicate that
  3132. ANSI.sys is installed.
  3133.  
  3134. Besides responding to the MS-DOS ANSI.sys Int 2Fh functions, the ANSIPLUS
  3135. driver also supports several Int 2Fh calls of its own, which provide
  3136. infrequently needed or special functions that programmers and the ANSIPLUS
  3137. utility programs may need, but that general users will not need.  This
  3138. application program interface (or "API") currently includes functions for
  3139. detecting the presence and version number of the ANSIPLUS driver, reporting on
  3140. the status of the ANSIPLUS driver, disabling or enabling the driver or certain
  3141. driver features, accessing screen lines saved for scroll-back, accessing the
  3142. clipboard, controlling the screen saver blanking time and key repeat rate,
  3143. loading the VGA/EGA character generator without affecting colors, and emulating
  3144. 4DOS/NDOS key stacking.
  3145.  
  3146. Full descriptions for all of the ANSIPLUS Interrupt 2Fh functions are included
  3147. only in the printed ANSIPLUS User's Guide.  The following description documents
  3148. one function, the ANSIPLUS Installation Check:
  3149.  
  3150.  
  3151. AX=1A00h: ANSIPLUS Installation Check
  3152.  
  3153.       Version: 2.00 or later
  3154.  
  3155.       Purpose: Provide emulation of the MS-DOS ANSI.sys installation check,
  3156.                with an extension to identify ANSIPLUS.  The Int 29h segment
  3157.                returned by this function is used by ANSIPLUS utility programs
  3158.                to access variables within the running ANSIPLUS driver.
  3159.  
  3160.     Arguments: AX = 1A00h
  3161.                BX = 'AN' (414Eh)
  3162.                CX = 'SI' (5349h)
  3163.                DX = '++' (2B2Bh)
  3164.  
  3165.       Results: AL = 0
  3166.                CH = major ANSIPLUS version number (3.10 or later)
  3167.                CL = minor ANSIPLUS version number (3.10 or later)
  3168.                DL = 00h for full capability driver (4.00 or later)
  3169.                     01h for reduced capability driver (4.00 or later)
  3170.                     2Bh full capability driver (before 4.00)
  3171.                     other values reserved for future use
  3172.                ES:BX = ANSIPLUS Int 29h entry point
  3173.  
  3174. If the BX, CX and DX arguments do not all match the magic argument values
  3175. above, then BX, CX, DL and ES will not be altered on return.
  3176.  
  3177. CX was not returned for driver versions before 3.10, so register CX will return
  3178. 5349h for the earlier versions.  The minor version number returned in CL is
  3179. coded as two hexadecimal nibbles.  Thus, for Release 3.10, CL will return 10h.
  3180.  
  3181. A further installation confirmation can be made by checking the 8 bytes at
  3182. ES:[BX-12] for the string "ANSIPLUS".  The ANSIPLUS version number will be a 4
  3183. character string at ES:[BX-4], containing, for example, "4.00".
  3184.  
  3185.                                        51
  3186.                                HOOKED INTERRUPTS
  3187.  
  3188. To implement all of its features, ANSIPLUS attaches itself to up to eleven
  3189. system interrupts.  Two are replaced (1Bh and 29h), and the remaining nine are
  3190. supplemented (i.e., ANSIPLUS calls the original interrupt but extends its
  3191. function).  If possible, ANSIPLUS should always be installed after any other
  3192. drivers that take over any of these interrupts without passing calls through.
  3193. The following table lists the ANSIPLUS hooked interrupts and reasons for each:
  3194.  
  3195. +------------------------------------------------------------------------------+
  3196. |                                  Table 6-1                                   |
  3197. |                          ANSIPLUS Hooked Interrupts                          |
  3198. +----------------------+-------------------------------------------------------+
  3199. |Interrupt Description | Reason                                                |
  3200. +----------------------+-------------------------------------------------------+
  3201. |09h Key Event         | Screen saver; scroll lock; scroll-back; key buffer    |
  3202. |                      | extension; repeated key suppression; smooth scroll    |
  3203. |                      | toggle; other special key processing                  |
  3204. |                      |                                                       |
  3205. |10h BIOS Video        | Palette/DAC control; beep tone generation; screen     |
  3206. |                      | saver; smooth scroll; scroll lock; scroll-back; BIOS  |
  3207. |                      | Write TTY ANSI trap; set scrollable region            |
  3208. |                      |                                                       |
  3209. |15h System Services   | Key processing; screen saver                          |
  3210. |                      |                                                       |
  3211. |16h BIOS Get Key      | Key buffer management; highlighted key echo; scroll-  |
  3212. |                      | lock and scroll-back; key reassignment; key stacking; |
  3213. |                      | key repeat rate; copy and paste                       |
  3214. |                      |                                                       |
  3215. |1Bh Keyboard Break    | Promote Ctrl+Break to front of key buffer             |
  3216. |                      |                                                       |
  3217. |1Ch User Timer Tick   | Screen saver; smooth scroll; color blinking; beep     |
  3218. |                      | tone generation; copy and paste                       |
  3219. |                      |                                                       |
  3220. |28h DOS Idle          | Copy and paste                                        |
  3221. |                      |                                                       |
  3222. |29h DOS Write Char    | Faster DOS screen output                              |
  3223. |                      |                                                       |
  3224. |2Fh Multiplex         | Installation checks; ANSIPLUS special functions API;  |
  3225. |                      | Windows initialization and exit processing; 4DOS/NDOS |
  3226. |                      | key stacking; DESQview detection; task switching;     |
  3227. |                      | command prompt detection; OS/2 CLS command            |
  3228. |                      |                                                       |
  3229. |33h MS Mouse          | Copy and paste; set scrollable region                 |
  3230. |                      |                                                       |
  3231. |74h PS/2 Mouse Event  | Screen saver; set scrollable region                   |
  3232. +----------------------+-------------------------------------------------------+
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.  
  3242.  
  3243.  
  3244.                                        52
  3245.  
  3246.  
  3247. The MS-DOS KEYB program for international keyboard support hooks the Int 09h
  3248. Key Event interrupt without passing calls through to whatever was installed
  3249. before (i.e., to ANSIPLUS).  However, the Novell DOS version of KEYB does pass
  3250. calls through to the prior Int 09h handler.  Therefore, under MS-DOS (but not
  3251. Novell DOS) if the KEYB program is being used to set up the keyboard, the
  3252. following command MUST be executed after loading KEYB, otherwise most ANSIPLUS
  3253. keyboard related features will not work:
  3254.  
  3255.     SETAPLUS LINK KEYEVENT
  3256.  
  3257. This command will re-install ANSIPLUS on the key event interrupt.  The INSTALL
  3258. program will automatically add this command to AUTOEXEC.bat if it finds a
  3259. reference in it to KEYB and you are not using Novell DOS.
  3260.  
  3261. If the DISPLAY.sys device driver for code page switching is being used, the
  3262. ANSIPLUS.sys device driver must be installed before DISPLAY.sys in CONFIG.sys.
  3263. The INSTALL program will also automatically handle this.
  3264.  
  3265. If you suspect that a system interrupt is no longer accessible to ANSIPLUS
  3266. because of a TSR or device driver that has been loaded after ANSIPLUS, you can
  3267. test this with the command:
  3268.  
  3269.     SETAPLUS INTERRUPT <intnum>
  3270.  
  3271. which displays, to the extent possible, the chain of programs attached to any
  3272. selected interrupt.  The <intnum> may be either a hexadecimal interrupt number
  3273. or one of the following keywords:
  3274.  
  3275.       KEYEVENT       Interrupt 09h Key Event
  3276.       VIDEO          Interrupt 10h Video
  3277.       SYSTEMSERVICE  Interrupt 15h System Services
  3278.       KEYREQUEST     Interrupt 16h Keyboard Request
  3279.       KEYBREAK       Interrupt 1Bh Keyboard Break
  3280.       TIMERTICK      Interrupt 1Ch User Timer Tick
  3281.       DOSIDLE        Interrupt 28h DOS Idle
  3282.       DOSTTY         Interrupt 29h DOS Fast TTY Output
  3283.       MULTIPLEX      Interrupt 2Fh Multiplex
  3284.       MSMOUSE        Interrupt 33h Mouse
  3285.       PS2MOUSE       Interrupt 74h PS/2 Mouse Event
  3286.  
  3287. If ANSIPLUS is missing from the listing, it can be relinked with the command:
  3288.  
  3289.     SETAPLUS LINK <intnum>
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.                                        53
  3304.  
  3305.